use strnlen in W_CheckNumForNamePwad
we clamped this to a length of 8 eitherways so might aswell just use strnlen which is safer in any case
This commit is contained in:
1 parent
295b35b23a
commit
de35e086d3
1 file changed
+1
-2
+1
-2
@@ -1106,8 +1106,7 @@ UINT16 W_CheckNumForNamePwad(const char *name, UINT16 wad, UINT16 startlump)
|
||||
if (!TestValidLump(wad, 0))
|
||||
return INT16_MAX;
|
||||
|
||||
namelen = strlen(name);
|
||||
namelen = min(namelen, 8); // :chaosleep:
|
||||
namelen = strnlen(name, 8); // :chaosleep:
|
||||
hash = W_HashLumpNameLen(name, namelen);
|
||||
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user