Mailing List Archive



Back to the month index Back to the list index

sbeer@ibm.net
Sun, 05 Jan 97 14:16:16 +0100


Message-Id: <9701051920.AA0071@YOUR-HOST-NAME>
Date: Sun, 05 Jan 97 14:16:16 +0100
From: sbeer@ibm.net
Subject: Re: [mSQL] Web page listing mSQL bugs (and fixes)

>
> I have compiled a list of bugs (all several of them) and patches. They are
> avilable from http://www.vuw.ac.nz/~lloyd/msql/. The patches for msqlimport
> should be available soon.
Hi Lloyd,

I suggest that you update the UPDATE patch in your page to the one posted by
Alex Tang, which uses 'strncpy' instead of strcpy to copy the new
string. I am enclosing Alex's patch below.

//----------------------------------------------------------
// Steve Beer
// sbeer@ibm.net

=====================Patch by Alex Tang for UPDATE bug======================

--- src/msql/table.c.orig Mon Dec 16 03:45:42 1996
+++ src/msql/table.c Tue Dec 24 09:43:09 1996
@@ -1337,7 +1337,7 @@
                                                         curField->name);
                                                return(-1);
                                         }
- strcpy(curField->value->val.charVal,cp);
+ strncpy(cp, curField->value->val.charVal, length);
                                         break;
 
                                 case TEXT_TYPE:

--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!