From 27950fdc52e0be9589da4771e39fe685b534d710 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Sun, 1 Jan 2023 23:57:21 +0000 Subject: [PATCH] Check state at the input end --- warc-dump-responses.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/warc-dump-responses.c b/warc-dump-responses.c index f769f7c..2a91a2b 100644 --- a/warc-dump-responses.c +++ b/warc-dump-responses.c @@ -149,4 +149,8 @@ checkstate: } } } + if (state != STATE_BEFORE_RECORD) { + fprintf(stderr, "Error: incomplete record at the end of input\n"); + return 1; + } }