[FFmpeg-cvslog] dpx: Make start offset unsigned

Derek Buitenhuis git at videolan.org
Sun Aug 5 23:06:31 CEST 2012


ffmpeg | branch: master | Derek Buitenhuis <derek.buitenhuis at gmail.com> | Sat Aug  4 19:41:20 2012 -0400| [965efc1673074ac1e6c28177a4718ed84f89ac83] | committer: Derek Buitenhuis

dpx: Make start offset unsigned

Some corrupted files would end up with a negative offset,
and segfault.

Fixes bug #177.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>

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

 libavcodec/dpx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
index fadd5c3..9bce648 100644
--- a/libavcodec/dpx.c
+++ b/libavcodec/dpx.c
@@ -62,7 +62,8 @@ static int decode_frame(AVCodecContext *avctx,
     AVFrame *const p = &s->picture;
     uint8_t *ptr;
 
-    int magic_num, offset, endian;
+    unsigned int offset;
+    int magic_num, endian;
     int x, y;
     int w, h, stride, bits_per_color, descriptor, elements, target_packet_size, source_packet_size;
 



More information about the ffmpeg-cvslog mailing list