aboutsummaryrefslogtreecommitdiff
path: root/lib/libubi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libubi.c')
-rw-r--r--lib/libubi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libubi.c b/lib/libubi.c
index 4322a19..aaeeb38 100644
--- a/lib/libubi.c
+++ b/lib/libubi.c
@@ -94,6 +94,7 @@ static int read_positive_ll(const char *file, long long *value)
}
buf[rd] = '\0';
+ *value = 0;
if (sscanf(buf, "%lld\n", value) != 1) {
errmsg("cannot read integer from \"%s\"\n", file);
errno = EINVAL;