diff options
| -rw-r--r-- | auth.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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", |
