On Thu, Feb 07, 2019 at 02:58:17PM -0800, chcunningham wrote:
> Bad content may contain stsc boxes with a first_chunk index that
> exceeds stco.entries (chunk_count). This ammends the existing check to
> include cases where chunk_count == 0. It also patches up the case
> when stsc refers to unknown
Thanks! Looking at that file, I notice the stsc refers to some unknown
chunks (stsco has no chunk offsets), but this is a non-issue since stts has
no samples. Next patch will detect this condition and simply clear out stsc
structures since they're not needed and contradict stco.
On Wed, Feb 6, 201
On Mon, Feb 04, 2019 at 04:30:29PM -0800, chcunningham wrote:
> Bad content may contain stsc boxes with a first_chunk index that
> exceeds stco.entries (chunk_count). This ammends the existing check to
> include cases where chunk_count == 0.
> ---
> libavformat/mov.c | 7 +--
> 1 file changed,
On Sat, Feb 2, 2019 at 3:55 AM Michael Niedermayer
wrote:
> > static inline int64_t mov_get_stsc_samples(MOVStreamContext *sc,
> unsigned int index)
> > {
> > -int chunk_count;
> > +unsigned int chunk_count = 0;
> >
> > if (mov_stsc_index_valid(index, sc->stsc_count))
> >
On Fri, Feb 01, 2019 at 06:25:19PM -0800, chcunningham wrote:
> Bad content may contain stsc boxes with a first_chunk index that
> exceeds stco.entries (chunk_count).
>
> mov_get_stsc_samples now checks for this and returns 0 when
> values are invalid.
> ---
> libavformat/mov.c | 4 ++--
> 1 file
2019-02-01 2:18 GMT+01:00, chcunningham :
> Bad content may contain stsc boxes with a first_chunk index that
> exceeds stco.entries (chunk_count).
>
> mov_get_stsc_samples now checks for this and returns 0 when
> values are invalid.
> Also updates MOVStsc to use unsigned ints, per spec.
Could be
Some extra context: this remedies some bad math that otherwise triggers an
abort near the bottom of mov_seek_stream().
My first thought on seeing this was we should probably be
returning AVERROR_INVALIDDATA somewhere. The stsc and stco boxes aren't
agreeing (stco says no chunks, stsc.first points