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; rval = TRUE;
else else
errno = EACCES; errno = EACCES;
(void) memcpy(sbp, &sb, sizeof(struct stat)); if (sbp)
(void) memcpy(sbp, &sb, sizeof(struct stat));
} }
debug_return_int(rval); debug_return_int(rval);