[freetds] bcp patch

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Fri Apr 8 10:43:50 EDT 2005


I just updated src/dblib/bcp.c. I added some TODO/FIXME comment it seems
to have some problems. For example I don't think TEXT can work without a
TEXTSIZE setting. I also fixed a small buffer underflow. Consider this
code

if (fgets(buf, sizeof(buf), fin) != NULL) {
	buf[strlen(buf) - 1] = 0; /* discard newline */

if fgets read the last line (without newline) the last line delete last
character. If last line is empty you have a buffer underflow. I'll
backport fix to 0.63.

freddy77


More information about the FreeTDS mailing list