Skip to content

Fix verify in old dbf file without EOF marker - #41

Open
NingQue0920 wants to merge 1 commit into
LindsayBradford:masterfrom
NingQue0920:master
Open

Fix verify in old dbf file without EOF marker#41
NingQue0920 wants to merge 1 commit into
LindsayBradford:masterfrom
NingQue0920:master

Conversation

@NingQue0920

Copy link
Copy Markdown

Comment thread interpreter.go
func verifyByteArraySizeAgainstExpected(s []byte, dt *DbfTable) {
expectedSize := uint32(dt.numberOfBytesInHeader) + dt.numberOfRecords*uint32(dt.lengthOfEachRecord) + 1
actualSize := uint32(len(s))
if dt.eofMarker != eofMarker {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Couldn't a file accidentally end with an eofMarker which is actually part of the data, not an EOF?

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