Browse Source

[core] return EINVAL if stat_cache_get_entry w/o /

return EINVAL if stat_cache_get_entry() called on path w/o leading '/'
personal/stbuehler/ci-build
Glenn Strauss 2 years ago
parent
commit
abe61d0445
  1. 5
      src/stat_cache.c

5
src/stat_cache.c

@ -930,7 +930,10 @@ stat_cache_entry * stat_cache_get_entry(const buffer *name) {
/* Note: paths are expected to be normalized before calling stat_cache,
* e.g. without repeated '/' */
if (name->ptr[0] != '/') return NULL;
if (name->ptr[0] != '/') {
errno = EINVAL;
return NULL;
}
/*
* check if the directory for this file has changed

Loading…
Cancel
Save