aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libq/tree.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libq/tree.c b/libq/tree.c
index 15d82674..46786342 100644
--- a/libq/tree.c
+++ b/libq/tree.c
@@ -1233,6 +1233,12 @@ tree_pkg_meta_get_int(tree_pkg_ctx *pkg_ctx, size_t offset, const char *keyn)
p[--s.st_size] = '\0';
m->storage->pos += s.st_size + 1;
}
+ else
+ {
+ /* hmmm, couldn't read the whole file?!? */
+ p[0] = '\0';
+ m->storage->pos++;
+ }
close(fd);
}
} else {