projects
/
xonotic
/
netradiant.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'ttimo/master'
[xonotic/netradiant.git]
/
tools
/
quake3
/
common
/
unzip.c
diff --git
a/tools/quake3/common/unzip.c
b/tools/quake3/common/unzip.c
index 61598d71fcde54b35ccbd56e0a0e91c20a1ff6a9..071074976bed8c987ea3a12c2d0e34ba301c4f08 100644
(file)
--- a/
tools/quake3/common/unzip.c
+++ b/
tools/quake3/common/unzip.c
@@
-1267,7
+1267,9
@@
static int unzlocal_getShort (FILE* fin, uLong *pX)
{
short v;
{
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;
*pX = __LittleShort( v);
return UNZ_OK;
@@
-1296,7
+1298,9
@@
static int unzlocal_getLong (FILE *fin, uLong *pX)
{
int v;
{
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;
*pX = __LittleLong( v);
return UNZ_OK;