[FFmpeg-cvslog] ffmdec: fix hypothetical overflows

Michael Niedermayer git at videolan.org
Wed Oct 17 21:06:13 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Oct 17 20:36:30 2012 +0200| [a0e0e1e19254d094d7d2cacaee9721fab19ecd21] | committer: Michael Niedermayer

ffmdec: fix hypothetical overflows

Fixes CID703739
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a0e0e1e19254d094d7d2cacaee9721fab19ecd21
---

 libavformat/ffmdec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index 66306bf..d4e6056 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -111,8 +111,8 @@ static int ffm_read_data(AVFormatContext *s,
             if (ffm->first_packet || (frame_offset & 0x8000)) {
                 if (!frame_offset) {
                     /* This packet has no frame headers in it */
-                    if (avio_tell(pb) >= ffm->packet_size * 3) {
-                        avio_seek(pb, -ffm->packet_size * 2, SEEK_CUR);
+                    if (avio_tell(pb) >= ffm->packet_size * 3LL) {
+                        avio_seek(pb, -ffm->packet_size * 2LL, SEEK_CUR);
                         goto retry_read;
                     }
                     /* This is bad, we cannot find a valid frame header */



More information about the ffmpeg-cvslog mailing list