Skip to content

Conversation

@guyrt
Copy link
Contributor

@guyrt guyrt commented Oct 19, 2013

closes #5156

Our c parser was not checking array bounds.

Example:

In [1]: from StringIO import StringIO; import pandas as pd

In [2]: data = """\     
1,2,3                      
4,,6
7,8,9                      
10,11,12\n"""

In [3]: df = pd.read_csv(StringIO(data), header=0, names=['a', 'b', 'c', 'd'], engine='c')
CParserError: Too many columns specified: expected 4 and found 3

Previously, this would segfault.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was requested here: #5211

jreback added a commit that referenced this pull request Oct 19, 2013
BUG: Fixed issue #5156: segfault on read_csv
@jreback jreback merged commit 6f6b0df into pandas-dev:master Oct 19, 2013
@jreback
Copy link
Contributor

jreback commented Oct 19, 2013

thanks! helpful as always

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.

BUG: read_csv with bad file coreing

2 participants