Message ID | 20200901150335.103855-1-derek.buitenhuis@gmail.com |
---|---|
State | Accepted |
Commit | 0c13f8a28c155a0a29667c4c5f0102abc6063416 |
Headers | show |
Series | [FFmpeg-devel,1/4] avformat/mov: Fix return type used for av_seek in mfra code | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
On 01/09/2020 16:03, Derek Buitenhuis wrote: > It should be a 64-bit integer, otherwise it overflows and fails > on files greater than 2GB on some systems like x86_64 Linux. > > Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> > --- > libavformat/mov.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Ping on this set. - Derek
On 9/1/20, Derek Buitenhuis <derek.buitenhuis@gmail.com> wrote: > It should be a 64-bit integer, otherwise it overflows and fails > on files greater than 2GB on some systems like x86_64 Linux. > > Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> > --- > libavformat/mov.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/mov.c b/libavformat/mov.c > index dcec74662d..f0b4edc2ed 100644 > --- a/libavformat/mov.c > +++ b/libavformat/mov.c > @@ -5095,7 +5095,7 @@ static int mov_read_sidx(MOVContext *c, AVIOContext > *pb, MOVAtom atom) > // See if the remaining bytes are just an mfra which we can ignore. > is_complete = offset == stream_size; > if (!is_complete) { > - int ret; > + int64_t ret; > int64_t original_pos = avio_tell(pb); > int32_t mfra_size; > if ((ret = avio_seek(pb, stream_size - 4, SEEK_SET)) < 0) > -- > 2.28.0 > Of course LGTM. > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
On 03/09/2020 14:47, Paul B Mahol wrote:
> Of course LGTM.
Pushed.
- Derek
diff --git a/libavformat/mov.c b/libavformat/mov.c index dcec74662d..f0b4edc2ed 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -5095,7 +5095,7 @@ static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom) // See if the remaining bytes are just an mfra which we can ignore. is_complete = offset == stream_size; if (!is_complete) { - int ret; + int64_t ret; int64_t original_pos = avio_tell(pb); int32_t mfra_size; if ((ret = avio_seek(pb, stream_size - 4, SEEK_SET)) < 0)
It should be a 64-bit integer, otherwise it overflows and fails on files greater than 2GB on some systems like x86_64 Linux. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)