[Scummvm-cvs-logs] SF.net SVN: scummvm:[34634] scummvm/trunk/common/unzip.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Sep 23 12:10:30 CEST 2008


Revision: 34634
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34634&view=rev
Author:   fingolfin
Date:     2008-09-23 10:10:29 +0000 (Tue, 23 Sep 2008)

Log Message:
-----------
Perform error checking when reading from a ZIP file

Modified Paths:
--------------
    scummvm/trunk/common/unzip.cpp

Modified: scummvm/trunk/common/unzip.cpp
===================================================================
--- scummvm/trunk/common/unzip.cpp	2008-09-23 10:08:45 UTC (rev 34633)
+++ scummvm/trunk/common/unzip.cpp	2008-09-23 10:10:29 UTC (rev 34634)
@@ -386,12 +386,12 @@
 */
 static int unzlocal_getShort(Common::File &fin, uLong *pX) {
 	*pX = fin.readUint16LE();
-	return UNZ_OK;
+	return fin.ioFailed() ? UNZ_ERRNO : UNZ_OK;
 }
 
 static int unzlocal_getLong(Common::File &fin, uLong *pX) {
 	*pX = fin.readUint32LE();
-	return UNZ_OK;
+	return fin.ioFailed() ? UNZ_ERRNO : UNZ_OK;
 }
 
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list