File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,8 @@ function process_header_and_schema_and_finish_row_skip!(
101101 try
102102 push!(parsing_ctx. header, Symbol(identifier_s))
103103 catch
104- throw(HeaderParsingError(" Error parsing header for column $i ('$(identifier_s) ') at " *
104+ # defensively truncate identifier_s to 2k characters in case something is very cursed
105+ throw(HeaderParsingError(" Error parsing header for column $i ('$(first(identifier_s, 2000 )) ') at " *
105106 " $(lines_skipped_total+ 1 ) :$pos (row:pos): presence of invalid non text bytes in the CSV snippet" ))
106107 end
107108 end
@@ -176,7 +177,8 @@ function process_header_and_schema_and_finish_row_skip!(
176177 try
177178 push!(parsing_ctx. header, Symbol(identifier_s))
178179 catch
179- throw(HeaderParsingError(" Error parsing header for column $i ('$(identifier_s) ') at " *
180+ # defensively truncate identifier_s to 2k characters in case something is very cursed
181+ throw(HeaderParsingError(" Error parsing header for column $i ('$(first(identifier_s, 2000 )) ') at " *
180182 " $(lines_skipped_total+ 1 ) :$pos (row:pos): presence of invalid non text bytes in the CSV snippet" ))
181183 end
182184 end
You can’t perform that action at this time.
0 commit comments