mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-21 00:27:09 +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;
|
goto err_fsync_dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pathlen == 0)
|
||||||
|
{
|
||||||
|
errno = EINVAL;
|
||||||
|
goto err_fsync_dir;
|
||||||
|
}
|
||||||
|
|
||||||
dirbuf = malloc(pathlen + 1);
|
dirbuf = malloc(pathlen + 1);
|
||||||
if (dirbuf == NULL)
|
if (dirbuf == NULL)
|
||||||
goto err_fsync_dir;
|
goto err_fsync_dir;
|
||||||
|
|||||||
Reference in New Issue
Block a user