Skip to content

Commit

Permalink
Fix undefined behavior when trying to fetch header information on an …
Browse files Browse the repository at this point in the history
…empty file
  • Loading branch information
red0124 committed Feb 17, 2024
1 parent 4bedc32 commit 7530be1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/ss/parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class parser {
return;
}

if (header_.empty()) {
if (header_.empty() && !eof()) {
split_header_data();
}

Expand Down

0 comments on commit 7530be1

Please sign in to comment.