Fix out of bounds reading for get_line_buffer, write more buffer mode unit tests

This commit is contained in:
ado
2024-02-18 11:20:36 +01:00
parent e89e268280
commit 82f8ed12b4
3 changed files with 221 additions and 210 deletions

View File

@@ -733,10 +733,10 @@ private:
return -1;
}
c = buffer[curr_char++];
if (curr_char >= csv_data_size) {
return -1;
}
c = buffer[curr_char++];
// TODO maybe remove this too
if (*lineptr == nullptr) {