]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/common/unzip.c
Merge remote-tracking branch 'ttimo/master'
[xonotic/netradiant.git] / tools / quake3 / common / unzip.c
index 61598d71fcde54b35ccbd56e0a0e91c20a1ff6a9..071074976bed8c987ea3a12c2d0e34ba301c4f08 100644 (file)
@@ -1267,7 +1267,9 @@ static int unzlocal_getShort (FILE* fin, uLong *pX)
 {
        short   v;
 
-       fread( &v, sizeof(v), 1, fin );
+       if ( fread( &v, sizeof( v ), 1, fin ) != 1 ) {
+               return UNZ_EOF;
+       }
 
        *pX = __LittleShort( v);
        return UNZ_OK;
@@ -1296,7 +1298,9 @@ static int unzlocal_getLong (FILE *fin, uLong *pX)
 {
        int             v;
 
-       fread( &v, sizeof(v), 1, fin );
+       if ( fread( &v, sizeof( v ), 1, fin ) != 1 ) {
+               return UNZ_EOF;
+       }
 
        *pX = __LittleLong( v);
        return UNZ_OK;