integer overflows, heap corruption

possible arbitrary code execution cannot be ruled out in some cases
precautionary checks

Originally committed as revision 3813 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer
2005-01-08 14:21:33 +00:00
parent 934b0821db
commit 568e18b15e
19 changed files with 108 additions and 26 deletions

View File

@@ -65,6 +65,9 @@ static void read_sgi_header(ByteIOContext *f, SGIInfo *info)
info->xsize = (unsigned short) get_be16(f);
info->ysize = (unsigned short) get_be16(f);
info->zsize = (unsigned short) get_be16(f);
if(info->zsize > 4096)
info->zsize= 0;
#ifdef DEBUG
printf("sgi header fields:\n");