diff options
author | shennetsind <ind@henn.et> | 2015-01-17 15:59:12 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2015-01-17 15:59:12 -0200 |
commit | 84b88781a0c39f7379ed85f74dc03c4e868a171f (patch) | |
tree | 41f0392d7d872fb038b42ddc82bde56be4582e47 /src/tool | |
parent | 36fa0940d5c97457f7093d81e7d298c88dac14af (diff) | |
download | hercules-84b88781a0c39f7379ed85f74dc03c4e868a171f.tar.gz hercules-84b88781a0c39f7379ed85f74dc03c4e868a171f.tar.bz2 hercules-84b88781a0c39f7379ed85f74dc03c4e868a171f.tar.xz hercules-84b88781a0c39f7379ed85f74dc03c4e868a171f.zip |
10 Distinct fixes
Addressing out of bounds read-write.
Special Thanks to 4144, Haruna!
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/tool')
-rw-r--r-- | src/tool/mapcache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c index 2ead5edbb..59d70b62d 100644 --- a/src/tool/mapcache.c +++ b/src/tool/mapcache.c @@ -129,7 +129,7 @@ void cache_map(char *name, struct map_data *m) encode_zip(write_buf, &len, m->cells, m->xs*m->ys); // Fill the map header - strncpy(info.name, name, MAP_NAME_LENGTH); + safestrncpy(info.name, name, MAP_NAME_LENGTH); if (strlen(name) > MAP_NAME_LENGTH) // It does not hurt to warn that there are maps with name longer than allowed. ShowWarning("Map name '%s' (length %"PRIuS") is too long. Truncating to '%s' (lentgh %d).\n", name, strlen(name), info.name, MAP_NAME_LENGTH); |