Silence a CI warning regarding the use of strcpy().

While this is a false positive (a sufficiently large buffer has been
allocated in the line above), the use of strdup() simplifies and clarifies
the code.

MFC after:	2 weeks
This commit is contained in:
Stefan Eßer 2019-01-22 13:11:15 +00:00
parent a8ef188288
commit 5f81babdee

View File

@ -241,8 +241,7 @@ get_font(void)
if (strcmp(buf, "NO")) {
if (fnt)
free(fnt);
fnt = (char *) malloc(strlen(buf) + 1);
strcpy(fnt, buf);
fnt = strdup(buf);
}
}
}