aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--auth.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/auth.c b/auth.c
index 1db2683..e642ccd 100644
--- a/auth.c
+++ b/auth.c
@@ -35,6 +35,11 @@ static char *dump_db(const char *const path)
fprintf(stderr, "%s: stat(2): %s\n", __func__, strerror(errno));
goto end;
}
+ else if (!sb.st_size)
+ {
+ fprintf(stderr, "%s: %s is empty\n", __func__, path);
+ goto end;
+ }
else if (sb.st_size > SIZE_MAX - 1)
{
fprintf(stderr, "%s: %s too big (%llu bytes, %zu max)\n",