From: <fr...@us...> - 2012-02-03 11:48:39
|
Revision: 4653 http://fuse-emulator.svn.sourceforge.net/fuse-emulator/?rev=4653&view=rev Author: fredm Date: 2012-02-03 11:48:30 +0000 (Fri, 03 Feb 2012) Log Message: ----------- Fix less than 0 check on unsigned expression (thanks, clang 2.1). Modified Paths: -------------- trunk/libspectrum/csw.c trunk/libspectrum/hacking/ChangeLog Modified: trunk/libspectrum/csw.c =================================================================== --- trunk/libspectrum/csw.c 2012-01-26 22:06:57 UTC (rev 4652) +++ trunk/libspectrum/csw.c 2012-02-03 11:48:30 UTC (rev 4653) @@ -86,8 +86,8 @@ if( compressed != 0 && compressed != 1 ) goto csw_bad_compress; + if( length < 29 - buffer[12] ) goto csw_short; length -= 29 - buffer[12]; - if( length < 0 ) goto csw_short; buffer += 29 + buffer[12]; break; Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2012-01-26 22:06:57 UTC (rev 4652) +++ trunk/libspectrum/hacking/ChangeLog 2012-02-03 11:48:30 UTC (rev 4653) @@ -869,3 +869,5 @@ recordings or saving snapshots (part of patch #3404090) (Sergio Baldoví). 20111106 rzx.c,szx.c: remove unused variables (thanks, gcc 4.6). +20120203 csw.c: fix less than 0 check on unsigned expression (thanks, clang + 2.1) (Fred). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |