We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSVStat
Input:
myfile.csv
a
test.cpp:
test.cpp
#include "csv.hpp" using namespace csv; int main(int argc, char *argv[]) { CSVStat stats("myfile.csv"); auto min = stats.get_mins(); return 0; }
Output:
$ ./fuzz_csv Segmentation fault
CMakeLists.txt
cmake_minimum_required(VERSION 3.16) project(fuzz-csv-parser) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) include(FetchContent) ################################################## # From: https://github.com/vincentlaucsb/csv-parser/issues/135#issuecomment-977528169 ################################################## # Install a header-only library from github as dependency. FetchContent_Declare( csv GIT_REPOSITORY https://github.com/vincentlaucsb/csv-parser.git GIT_TAG master ) FetchContent_MakeAvailable(csv) include_directories( ${CMAKE_SOURCE_DIR}/${FolderSource} # Find headers from source folder ${csv_SOURCE_DIR}/single_include # Issue #139 for this repo ) ################################################## # End from ################################################## add_executable(fuzz_csv) target_sources(fuzz_csv PRIVATE test.cpp ) target_link_libraries(fuzz_csv csv)
Full Command:
~/e4/build-testing$ cmake ../fuzz-csv-parser/ Building CSV library using C++17 -- Configuring done -- Generating done -- Build files have been written to: ~/e4/build-testing ~/e4/build-testing$ make clean all [ 5%] Building CXX object _deps/csv-build/include/internal/CMakeFiles/csv.dir/basic_csv_parser.cpp.o [ 11%] Building CXX object _deps/csv-build/include/internal/CMakeFiles/csv.dir/col_names.cpp.o [ 16%] Building CXX object _deps/csv-build/include/internal/CMakeFiles/csv.dir/csv_format.cpp.o [ 22%] Building CXX object _deps/csv-build/include/internal/CMakeFiles/csv.dir/csv_reader.cpp.o [ 27%] Building CXX object _deps/csv-build/include/internal/CMakeFiles/csv.dir/csv_reader_iterator.cpp.o [ 33%] Building CXX object _deps/csv-build/include/internal/CMakeFiles/csv.dir/csv_row.cpp.o [ 38%] Building CXX object _deps/csv-build/include/internal/CMakeFiles/csv.dir/csv_row_json.cpp.o [ 44%] Building CXX object _deps/csv-build/include/internal/CMakeFiles/csv.dir/csv_stat.cpp.o [ 50%] Building CXX object _deps/csv-build/include/internal/CMakeFiles/csv.dir/csv_utility.cpp.o [ 55%] Linking CXX static library libcsv.a [ 55%] Built target csv [ 61%] Building CXX object CMakeFiles/fuzz_csv.dir/test.cpp.o [ 66%] Linking CXX executable fuzz_csv [ 66%] Built target fuzz_csv [ 72%] Building CXX object CMakeFiles/fuzz_csv2.dir/test2.cpp.o [ 77%] Linking CXX executable fuzz_csv2 [ 77%] Built target fuzz_csv2 [ 83%] Building CXX object _deps/csv-build/programs/CMakeFiles/csv_info.dir/csv_info.cpp.o [ 88%] Linking CXX executable csv_info [ 88%] Built target csv_info [ 94%] Building CXX object _deps/csv-build/programs/CMakeFiles/csv_stats.dir/csv_stats.cpp.o [100%] Linking CXX executable csv_stats [100%] Built target csv_stats ~/e4/build-testing$ ./fuzz_csv Segmentation fault
The text was updated successfully, but these errors were encountered:
Fixed by an earlier version but added a regression test in #228 to confirm the fix. Thanks for the report.
Sorry, something went wrong.
No branches or pull requests
Input:
myfile.csv
test.cpp
:Output:
CMake Details
CMakeLists.txt
Full Command:
The text was updated successfully, but these errors were encountered: