summaryrefslogtreecommitdiff
path: root/src/common/grfio.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-05-17 02:35:40 +0200
committerHaru <haru@dotalux.com>2015-05-17 02:35:53 +0200
commitb9a8ad743a78d5053482cb4d47d2795252ec9095 (patch)
tree40d10510054cd3dd254c366ccbe550817cb3e4ec /src/common/grfio.c
parentb2b597c523f19fbacaf052117d47f254483c6e0e (diff)
downloadhercules-b9a8ad743a78d5053482cb4d47d2795252ec9095.tar.gz
hercules-b9a8ad743a78d5053482cb4d47d2795252ec9095.tar.bz2
hercules-b9a8ad743a78d5053482cb4d47d2795252ec9095.tar.xz
hercules-b9a8ad743a78d5053482cb4d47d2795252ec9095.zip
Fixed some issues detected by coverity scan
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/grfio.c')
-rw-r--r--src/common/grfio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/grfio.c b/src/common/grfio.c
index d226fb158..e95163569 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -645,6 +645,7 @@ static int grfio_entryread(const char *grfname, int gentry)
aFree(rBuf);
entrys = getlong(grf_header+0x26) - 7;
+ Assert_retr(4, entrys >= 0);
// Get an entry
for (entry = 0, ofs = 0; entry < entrys; ++entry) {