Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix json detected as dbf when it starts with low ascii values #241

Merged
merged 1 commit into from
Jan 30, 2022

Conversation

gabriel-vasile
Copy link
Owner

@gabriel-vasile gabriel-vasile commented Jan 30, 2022

Byte 0x09 represents ninth month in dbf header, but it is also the ascii
value of < TAB >. This made dbf detection pass for json and txt files
happening to contain low ascii values at the start.
This commit improves dbf detection to check for several null bytes in
the input. json and txt files never contain null bytes.

Byte 0x09 represents ninth month in dbf header, but it is also the ascii
value of <TAB>. This made dbf detection pass for json and txt files
happening to contain these low ascii values at the start.
This commit improves dbf detection to check for several null bytes in
the input. json and txt files never contain null bytes.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.407% when pulling 2345dc1 on dbf into b497e3d on master.

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.

2 participants