summaryrefslogtreecommitdiff
path: root/libavcodec/dpx.c
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2012-08-04 19:41:20 -0400
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2012-08-05 12:44:30 -0400
commit965efc1673074ac1e6c28177a4718ed84f89ac83 (patch)
tree436b1941ed8b610f89983284a3967f5f72e55e51 /libavcodec/dpx.c
parent800750417ffea64cde827de08e31e6523205f8d1 (diff)
downloadffmpeg-965efc1673074ac1e6c28177a4718ed84f89ac83.tar.gz
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@gmail.com>
Diffstat (limited to 'libavcodec/dpx.c')
-rw-r--r--libavcodec/dpx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
index fadd5c3bae..9bce6483b5 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;