1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-16 06:01:02 +03:00

libpq's pqGetnchar() should not return a null-terminated value

anymore.  Fix for large objects.
This commit is contained in:
Bruce Momjian
1998-08-29 02:09:27 +00:00
parent b9b00d5fe4
commit 3e87302201
3 changed files with 8 additions and 6 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.62 1998/08/17 03:50:35 scrappy Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.63 1998/08/29 02:09:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -612,6 +612,7 @@ getAnotherTuple(PGconn *conn, int binary)
if (vlen > 0)
if (pqGetnchar((char *) (tup[i].value), vlen, conn))
return EOF;
/* we have to terminate this ourselves */
tup[i].value[vlen] = '\0';
}
/* advance the bitmap stuff */