summaryrefslogtreecommitdiff
path: root/src/libffmpeg/libavcodec/cinepak.c
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2005-07-19 20:30:38 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2005-07-19 20:30:38 +0000
commitfcc9a6282dd3c541055636ac49882d1639da251b (patch)
tree588b324e232caccf8085c85c7119d8d29ee2b6e8 /src/libffmpeg/libavcodec/cinepak.c
parent6bfc655ee19aa82cce3277e6f9c861661cca5fb4 (diff)
downloadxine-lib-fcc9a6282dd3c541055636ac49882d1639da251b.tar.gz
xine-lib-fcc9a6282dd3c541055636ac49882d1639da251b.tar.bz2
here is cvs update people requested - somebody please check for gcc4 compatibility
CVS patchset: 7668 CVS date: 2005/07/19 20:30:38
Diffstat (limited to 'src/libffmpeg/libavcodec/cinepak.c')
-rw-r--r--src/libffmpeg/libavcodec/cinepak.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libffmpeg/libavcodec/cinepak.c b/src/libffmpeg/libavcodec/cinepak.c
index 3c560fdc5..3b00a1605 100644
--- a/src/libffmpeg/libavcodec/cinepak.c
+++ b/src/libffmpeg/libavcodec/cinepak.c
@@ -274,6 +274,9 @@ static int cinepak_decode_strip (CinepakContext *s,
while ((data + 4) <= eod) {
chunk_id = BE_16 (&data[0]);
chunk_size = BE_16 (&data[2]) - 4;
+ if(chunk_size < 0)
+ return -1;
+
data += 4;
chunk_size = ((data + chunk_size) > eod) ? (eod - data) : chunk_size;