diff --git a/plugins/sudoers/goodpath.c b/plugins/sudoers/goodpath.c index d0c6df9e2..09fb76510 100644 --- a/plugins/sudoers/goodpath.c +++ b/plugins/sudoers/goodpath.c @@ -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);