Up Prev Next
From: mpeppler at itf dot ch (Michael Peppler)
Subject: Sybperl bcp_sendrow bug
Date: Mar 5 1996 9:05AM
I've just uncovered a subtle bug with sybperl's implementation of
bcp_meminit()/bcp_sendrow(). When bulk-copying binary data
(specifically TEXT or IMAGE columns) to the server the data can get
truncated if it includes a NULL byte. This bug exists on all versions
of sybperl, but it only shows up when copying binary data to the server
- bcp operations involving 'normal' columns are immune to this bug.
It's fairly obvious that nobody's been bitten by this bug (yet! - or
I'd have heard about it :-) but it's a pretty stupid coding error that
needs to be corrected.
I attach two patches below that should solve this problem. The first
patch is for sybperl 2.03 and the second is for sybperl 2.04.
To apply the patch, cd sybperl-2.0x/DBlib and say patch -p