M_ZERO the temp buffer in expand_name() otherwise if an error occurs
while logging we may pass a non NUL terminated string to log(9) for a %s format arg.
This commit is contained in:
+1
-1
@@ -1886,7 +1886,7 @@ const char *name; uid_t uid; pid_t pid; {
|
||||
char *format = corefilename;
|
||||
size_t namelen;
|
||||
|
||||
temp = malloc(MAXPATHLEN + 1, M_TEMP, M_NOWAIT);
|
||||
temp = malloc(MAXPATHLEN + 1, M_TEMP, M_NOWAIT | M_ZERO);
|
||||
if (temp == NULL)
|
||||
return NULL;
|
||||
namelen = strlen(name);
|
||||
|
||||
Reference in New Issue
Block a user