[freetds] [PATCH] Fix segfault when triggering a foreign key violation

Alex Kiesel alex.kiesel at document-root.de
Sat Jan 10 17:11:14 EST 2004


Hi,

I found that when inserting a row that triggers a foreign key violation
or duplicate row violation, freetds was unable to properly read all data
from the wire.

When such an aforementioned error is triggered the database sends a EED
token which gets processed by tds_process_msg(). When the status byte of
the EED message is set to 1, additional error data follows; freetds
fails to read this data from wire - which appears to let sqsh think it
must read data and thus causing it to segfault.

The attached patch fixes this bug; I'd be glad if it's not too late for
the release...

Greets from Karlsruhe,
-Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: src-tds-token.c.diff
Type: text/x-patch
Size: 1278 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20040110/c9aa4507/src-tds-token.c.bin


More information about the FreeTDS mailing list