Update of /cvsroot/firebird/interbase/dsql
In directory slayer.i.sourceforge.net:/tmp/cvs-serv9359/interbase/dsql
Modified Files:
dsql.c
Log Message:
10/13/2000
Fix for bug #113708.
COBOL programs, as well as some other non-c languages,
do not use null terminated strings and will encounter
random -502 CURSOR ALREADY DEFINED messages.
With the introduction of dialect 3, the cursor name parsing routine
was modified to accept cursor names that include spaces. COBOL programs,
using dialect 1, which pass a space-terminated cursor name may have
adjacent binary data included as a part of the cursor name.
This fix changes the parse routine for dialect 1 processing
to stop on either the first space or the first null character.
pat
...pat
Index: dsql.c
===================================================================
RCS file: /cvsroot/firebird/interbase/dsql/dsql.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** dsql.c 2000/08/15 18:40:55 1.2
--- dsql.c 2000/10/13 06:00:19 1.3
***************
*** 990,995 ****
{
USHORT i;
! length = name_length (input_cursor);
! for (i=0; i<length && i< sizeof(cursor)-1; i++)
cursor [i] = UPPER7 (input_cursor [i]);
cursor [i] = '\0';
--- 990,996 ----
{
USHORT i;
! for (i=0; i < sizeof(cursor)-1 /* PJPG 20001013 */
! && input_cursor[i] /* PJPG 20001013 */
! && input_cursor[i] != ' '; i++) /* PJPG 20001013 */
cursor [i] = UPPER7 (input_cursor [i]);
cursor [i] = '\0';
|