mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 13:29:03 +02:00
fsync_dir: abort if path length is empty
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user