From 7530be1c44790a84cc2c5b4a77941dec60fbac94 Mon Sep 17 00:00:00 2001 From: ado Date: Sat, 17 Feb 2024 02:26:19 +0100 Subject: [PATCH 1/3] 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(); } From 8d1637cad13b1915e07d2c19cb67786e406afc90 Mon Sep 17 00:00:00 2001 From: ado Date: Sat, 17 Feb 2024 02:34:51 +0100 Subject: [PATCH 2/3] Update single-header.yml --- ssp.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssp.hpp b/ssp.hpp index cb0bc2e..d66e595 100644 --- a/ssp.hpp +++ b/ssp.hpp @@ -2281,7 +2281,7 @@ public: return; } - if (header_.empty()) { + if (header_.empty() && !eof()) { split_header_data(); } From c05ab35a33cf6c9363a059736cd87d0a28d37935 Mon Sep 17 00:00:00 2001 From: ado Date: Sat, 17 Feb 2024 02:41:02 +0100 Subject: [PATCH 3/3] [skip ci] Update version --- CMakeLists.txt | 2 +- meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b5177ac..bb635f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.14) project( ssp - VERSION 1.6.1 + VERSION 1.6.2 DESCRIPTION "csv parser" HOMEPAGE_URL "https://github.com/red0124/ssp" LANGUAGES CXX diff --git a/meson.build b/meson.build index 18d0918..a4880dd 100644 --- a/meson.build +++ b/meson.build @@ -6,7 +6,7 @@ project( 'cpp_std=c++17', 'buildtype=debugoptimized', 'wrap_mode=forcefallback'], - version: '1.6.1', + version: '1.6.2', meson_version:'>=0.54.0') fast_float_dep = dependency('fast_float')