summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorParadox924X <Paradox924X@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-09-07 22:43:18 +0000
committerParadox924X <Paradox924X@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-09-07 22:43:18 +0000
commitbe680a4b1e60147fb3573d1a09593de2fdd638df (patch)
tree6110b66eda7024350ddaa5125819b9c671434a5a /src/map/map.c
parent2678cc840bb707ff33378ba0d0cbfd8a737b5743 (diff)
downloadhercules-be680a4b1e60147fb3573d1a09593de2fdd638df.tar.gz
hercules-be680a4b1e60147fb3573d1a09593de2fdd638df.tar.bz2
hercules-be680a4b1e60147fb3573d1a09593de2fdd638df.tar.xz
hercules-be680a4b1e60147fb3573d1a09593de2fdd638df.zip
Ensure a pointer is valid within map_readfromcache() before attempting to access its members.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14401 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 790c1515a..27d7e01d8 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2719,7 +2719,7 @@ int map_readfromcache(struct map_data *m, char *buffer, char *decode_buffer)
p += sizeof(struct map_cache_map_info) + info->len;
}
- if( i < header->map_count ) {
+ if( info && i < header->map_count ) {
unsigned long size, xy;
if( info->xs <= 0 || info->ys <= 0 )