From 6e908327cb220f998afdba6cbb64a29be0ff5c62 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 14 Feb 2022 13:00:55 +0100 Subject: [PATCH] hexdump: call getline() in more robust way Signed-off-by: Karel Zak --- text-utils/hexdump-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text-utils/hexdump-parse.c b/text-utils/hexdump-parse.c index 1d2e689b67..0ceff8f215 100644 --- a/text-utils/hexdump-parse.c +++ b/text-utils/hexdump-parse.c @@ -78,7 +78,7 @@ void addfile(char *name, struct hexdump *hex) { char *fmt, *buf = NULL; FILE *fp; - size_t n; + size_t n = 0; if ((fp = fopen(name, "r")) == NULL) err(EXIT_FAILURE, _("can't read %s"), name); -- 2.47.2