fsync_dir: abort if path length is empty

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-16 21:15:01 +00:00
parent d0a125c16d
commit 47a654a870
+6
View File
@@ -2135,6 +2135,12 @@ fsync_dir(const char *path)
goto err_fsync_dir;
}
if (pathlen == 0)
{
errno = EINVAL;
goto err_fsync_dir;
}
dirbuf = malloc(pathlen + 1);
if (dirbuf == NULL)
goto err_fsync_dir;