Skip to content

Conversation

@pupitetris
Copy link

More robust handling of MEMO records, and ability to detect corrupt
MEMO data and report it on the output and stderr.

pgdbf was crashing on me due to a mismatched dbf/fpt combo.
Added code to prevent calling safeprintbuf with a memo length
that in combination with the memo start offset, exceeds
the memo file length.

Usage:

-w excesslength

Warn of corrupted MEMO fields, by reporting errors on the output and through
standard error. excesslenght specifies a MEMO length beyond which a MEMO record
will be considered corrupt. A value of 0 (zero) will disable this heuristic,
but the other warnings will still be issued (invalid start offset, invalid type,
zero length and length beyond end of file). Conversion will not stop when warnings
are issued.

Also:

src/pgdbf.h:exitwitherror: Flush the standard output in case data is still buffered.
Some processed output was being left out if the program crashed or exit.

    Source: http://www.yaldex.com/fox_pro_tutorial/html/74f53aef-fd56-4f1a-a413-4f045922db21.htm (a Microsoft Tutorial legacy mirror)
    exitwitherror: Flush the standard output in case data is still buffered.
        Some processed output was being left out if the program crashed or exit.
    pgdbf was crashing on me due to a mismatched dbf/fpt combo.
    Added code to prevent calling safeprintbuf with a memo length
        that in combination with the memo start offset, exceeds
        the memo file length.
    Added -w option to activate warnings that allow the detection
        of corrupted MEMO data.
    Added help text for the new -w option.
-w excesslength

Warn of corrupted MEMO fields, by reporting errors on the output and through
standard error. excesslenght specifies a MEMO length beyond which a MEMO record
will be considered corrupt. A value of 0 (zero) will disable this heuristic,
but the other warnings will still be issued (invalid start offset, invalid type,
zero length and length beyond end of file). Conversion will not stop when warnings
are issued.
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