aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-exec.c
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1998-01-26 01:42:53 +0000
committerMarc G. Fournier <scrappy@hub.org>1998-01-26 01:42:53 +0000
commitd5bbe2aca55bc833e38c768d7f82c129b8b70c83 (patch)
tree47f4e1ecb3277869bb276e5433df335d920d1baf /src/interfaces/libpq/fe-exec.c
parent91d983aa1140e3ae109684ff7c916583ed059e0e (diff)
downloadpostgresql-d5bbe2aca55bc833e38c768d7f82c129b8b70c83.tar.gz
postgresql-d5bbe2aca55bc833e38c768d7f82c129b8b70c83.zip
From: Phil Thompson <phil@river-bank.demon.co.uk>
I've completed the patch to fix the protocol and authentication issues I was discussing a couple of weeks ago. The particular changes are: - the protocol has a version number - network byte order is used throughout - the pg_hba.conf file is used to specify what method is used to authenticate a frontend (either password, ident, trust, reject, krb4 or krb5) - support for multiplexed backends is removed - appropriate changes to man pages - the -a switch to many programs to specify an authentication service no longer has any effect - the libpq.so version number has changed to 1.1 The new backend still supports the old protocol so old interfaces won't break.
Diffstat (limited to 'src/interfaces/libpq/fe-exec.c')
-rw-r--r--src/interfaces/libpq/fe-exec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index 1f452ffe2d1..b9517cebbf2 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.45 1997/12/23 20:00:06 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.46 1998/01/26 01:42:35 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -168,7 +168,7 @@ getTuple(PGconn *conn, PGresult *result, int binary)
if ((nfields % BYTELEN) > 0)
nbytes++;
- if (pqGetnchar(bitmap, nbytes, pfin, pfdebug) == 1)
+ if (nbytes >= MAX_FIELDS || pqGetnchar(bitmap, nbytes, pfin, pfdebug) == 1)
{
sprintf(conn->errorMessage,
"Error reading null-values bitmap from row data stream\n");
@@ -189,10 +189,10 @@ getTuple(PGconn *conn, PGresult *result, int binary)
else
{
/* get the value length (the first four bytes are for length) */
- pqGetInt(&vlen, VARHDRSZ, pfin, pfdebug);
+ pqGetInt(&vlen, 4, pfin, pfdebug);
if (binary == 0)
{
- vlen = vlen - VARHDRSZ;
+ vlen = vlen - 4;
}
if (vlen < 0)
vlen = 0;