Don't write to sbp if it is NULL
This commit is contained in:
@@ -54,6 +54,7 @@ sudo_goodpath(const char *path, struct stat *sbp)
|
|||||||
rval = TRUE;
|
rval = TRUE;
|
||||||
else
|
else
|
||||||
errno = EACCES;
|
errno = EACCES;
|
||||||
|
if (sbp)
|
||||||
(void) memcpy(sbp, &sb, sizeof(struct stat));
|
(void) memcpy(sbp, &sb, sizeof(struct stat));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user