mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
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.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user