Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Terminate string that is sent to strcmp. (#9517)
- A buffer read from `fread` is not null terminated. Make sure we null terminate it before we do string operations on it like `strcmp()`. This was preventing the determination of delimiters by reading the beginning of csv files for the pattern `"sep=x"` where x is the delimiter. If not explicitly specified, the default is of course `,` - Fixes #9487.
- Loading branch information
The parallel line 215 has the same problem (
read_csv_dataset_size()
)By doing a
grep
on the sources I see a few more places where the return value ofomc_fread()
is not used. I didn't check if is about reading (and comparing) strings though.