fix possible NULL-pointer dereference in deh_procStringSub()

This commit is contained in:
Fabian Greffrath 2020-01-16 11:31:30 +01:00
parent 6039293aca
commit cf6a7595cd

View File

@ -2575,7 +2575,7 @@ boolean deh_procStringSub(char *key, char *lookfor, char *newstring, FILE *fpout
if (!key)
if (fpout) fprintf(fpout,
"Assigned '%.12s%s' to'%.12s%s' at key %s\n",
lookfor, (strlen(lookfor) > 12) ? "..." : "",
lookfor ? : "", (lookfor && strlen(lookfor) > 12) ? "..." : "",
newstring, (strlen(newstring) > 12) ? "..." :"",
deh_strlookup[i].lookup);