From 7530be1c44790a84cc2c5b4a77941dec60fbac94 Mon Sep 17 00:00:00 2001 From: ado Date: Sat, 17 Feb 2024 02:26:19 +0100 Subject: [PATCH] Fix undefined behavior when trying to fetch header information on an empty file --- include/ss/parser.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ss/parser.hpp b/include/ss/parser.hpp index db80dd3..10f98e1 100644 --- a/include/ss/parser.hpp +++ b/include/ss/parser.hpp @@ -155,7 +155,7 @@ public: return; } - if (header_.empty()) { + if (header_.empty() && !eof()) { split_header_data(); }