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:
@ -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 */
|
||||
|
Reference in New Issue
Block a user