[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec 8bps.c,1.5,1.6
Michael Niedermayer CVS
michael
Tue Jul 12 00:56:26 CEST 2005
Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv15950
Modified Files:
8bps.c
Log Message:
fix segfault (bug #1165640)
Index: 8bps.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/8bps.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- 8bps.c 23 Jan 2005 18:09:05 -0000 1.5
+++ 8bps.c 11 Jul 2005 22:56:23 -0000 1.6
@@ -100,11 +100,13 @@
dlen = be2me_16(*(unsigned short *)(lp+row*2));
/* Decode a row of this plane */
while(dlen > 0) {
+ if(dp + 1 >= buf+buf_size) return -1;
if ((count = *dp++) <= 127) {
count++;
dlen -= count + 1;
if (pixptr + count * px_inc > pixptr_end)
break;
+ if(dp + count > buf+buf_size) return -1;
while(count--) {
*pixptr = *dp++;
pixptr += px_inc;
More information about the ffmpeg-cvslog
mailing list