From 1902ca6159cf39148ffbf319ae752128183aff77 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 10 Oct 2010 18:21:30 +0900 Subject: [PATCH] Ensure the string to be hashed is terminated. --- libs/util/wadfile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/util/wadfile.c b/libs/util/wadfile.c index 0599e5abc..71fe61696 100644 --- a/libs/util/wadfile.c +++ b/libs/util/wadfile.c @@ -61,11 +61,12 @@ static __attribute__ ((used)) const char rcsid[] = static uintptr_t wad_get_hash (void *l, void *unused) { - char name[16]; + char name[17]; int i; for (i = 0; i < 16; i++) name[i] = tolower (((lumpinfo_t *) l)->name[i]); + name[16] = 0; return Hash_String (name); }