diff --git a/src/util/dirpath.c b/src/util/dirpath.c index 3957611b90..830ac26315 100644 --- a/src/util/dirpath.c +++ b/src/util/dirpath.c @@ -560,6 +560,9 @@ ConstructLocalPath(const char *cpath, const char *relativeTo, *fullPathBufp = NULL; + if (cpath == NULL) + return ENOENT; + while (isspace(*cpath)) { cpath++; } @@ -654,6 +657,9 @@ ConstructLocalPath(const char *cpath, const char *relativeTo, *fullPathBufp = NULL; + if (cpath == NULL) + return ENOENT; + while (isspace(*cpath)) { cpath++; }