2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-29 05:17:54 +00:00

Don't write to sbp if it is NULL

This commit is contained in:
Todd C. Miller 2011-11-17 16:33:32 -05:00
parent eb687d2a4e
commit c189fa5f55

View File

@ -54,7 +54,8 @@ sudo_goodpath(const char *path, struct stat *sbp)
rval = TRUE;
else
errno = EACCES;
(void) memcpy(sbp, &sb, sizeof(struct stat));
if (sbp)
(void) memcpy(sbp, &sb, sizeof(struct stat));
}
debug_return_int(rval);