aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfs')
-rw-r--r--lib/sqfs/dir_writer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqfs/dir_writer.c b/lib/sqfs/dir_writer.c
index 5b0ce7a..8703b77 100644
--- a/lib/sqfs/dir_writer.c
+++ b/lib/sqfs/dir_writer.c
@@ -129,6 +129,9 @@ int sqfs_dir_writer_add_entry(sqfs_dir_writer_t *writer, const char *name,
if (type < 0)
return type;
+ if (name[0] == '\0')
+ return SQFS_ERROR_CORRUPTED;
+
ent = alloc_flex(sizeof(*ent), 1, strlen(name));
if (ent == NULL)
return SQFS_ERROR_ALLOC;