Skip to content

Fixed memory exception when extra erroneous comma is present out-of-s…#2570

Merged
mattdowle merged 1 commit intomasterfrom
extra_comma
Jan 17, 2018
Merged

Fixed memory exception when extra erroneous comma is present out-of-s…#2570
mattdowle merged 1 commit intomasterfrom
extra_comma

Conversation

@mattdowle
Copy link
Copy Markdown
Member

Closes #2523
Thanks @st-pasha for great find and test.
Added test which I confirmed is detected by ASAN before the fix :

fread(f, header=FALSE)
=================================================================
==4281==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200007cad7 at pc 0x7f42b0dbb235 bp 0x7ffc940a8000 sp 0x7ffc940a7ff0
READ of size 1 at 0x60200007cad7 thread T0
#0 0x7f42b0dbb234 in freadMain /tmp/Rtmpf2iEIj/R.INSTALL7d51cfd676/data.table/src/fread.c:2002

@mattdowle mattdowle requested a review from st-pasha January 17, 2018 02:39
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #2570 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #2570   +/-   ##
======================================
  Coverage    91.4%   91.4%           
======================================
  Files          63      63           
  Lines       12097   12097           
======================================
  Hits        11057   11057           
  Misses       1040    1040
Impacted Files Coverage Δ
src/fread.c 95.97% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 78e30d5...e76a11a. Read the comment docs.

@mattdowle mattdowle added this to the v1.10.6 milestone Jan 17, 2018
@mattdowle mattdowle merged commit da43dc0 into master Jan 17, 2018
@mattdowle mattdowle deleted the extra_comma branch January 17, 2018 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fread: possible segfault when reading a file with extra sep on out-of-sample row

3 participants