[xiph-commits] r16111 - branches/theora-thusnelda/lib/dec
tterribe at svn.xiph.org
tterribe at svn.xiph.org
Sat Jun 13 22:57:40 PDT 2009
Author: tterribe
Date: 2009-06-13 22:57:40 -0700 (Sat, 13 Jun 2009)
New Revision: 16111
Modified:
branches/theora-thusnelda/lib/dec/state.c
Log:
Check for empty frame sizes.
Modified: branches/theora-thusnelda/lib/dec/state.c
===================================================================
--- branches/theora-thusnelda/lib/dec/state.c 2009-06-14 05:44:01 UTC (rev 16110)
+++ branches/theora-thusnelda/lib/dec/state.c 2009-06-14 05:57:40 UTC (rev 16111)
@@ -617,11 +617,11 @@
The displayable frame must fit inside the encoded frame.
The color space must be one known by the encoder.*/
if((_info->frame_width&0xF)||(_info->frame_height&0xF)||
- _info->frame_width>=0x100000||_info->frame_height>=0x100000||
+ _info->frame_width<=0||_info->frame_width>=0x100000||
+ _info->frame_height<=0||_info->frame_height>=0x100000||
_info->pic_x+_info->pic_width>_info->frame_width||
_info->pic_y+_info->pic_height>_info->frame_height||
- _info->pic_x>255||
- _info->frame_height-_info->pic_height-_info->pic_y>255||
+ _info->pic_x>255||_info->frame_height-_info->pic_height-_info->pic_y>255||
/*Note: the following <0 comparisons may generate spurious warnings on
platforms where enums are unsigned.
We could cast them to unsigned and just use the following >= comparison,
More information about the commits
mailing list