[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec mpeg12.c,1.246,1.247
Benjamin Larsson CVS
banan
Sat Jan 14 18:43:24 CET 2006
Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv19286/libavcodec
Modified Files:
mpeg12.c
Log Message:
Off by one fix to prevent possible segfault. Patch by jwestfall at surrealistic dot net.
Index: mpeg12.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpeg12.c,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -d -r1.246 -r1.247
--- mpeg12.c 12 Jan 2006 22:43:15 -0000 1.246
+++ mpeg12.c 14 Jan 2006 17:43:22 -0000 1.247
@@ -2178,7 +2178,7 @@
const uint8_t *buf_ptr= *pbuf_ptr;
buf_ptr++; //gurantees that -1 is within the array
- buf_end -= 2; // gurantees that +2 is within the array
+ buf_end -= 3; // gurantees that +3 is within the array
while (buf_ptr < buf_end) {
if(*buf_ptr==0){
@@ -2192,7 +2192,7 @@
}
buf_ptr += 2;
}
- buf_end += 2; //undo the hack above
+ buf_end += 3; //undo the hack above
*pbuf_ptr = buf_end;
return -1;
More information about the ffmpeg-cvslog
mailing list