summaryrefslogtreecommitdiff
path: root/src/backend/libpq/pqcomm.c
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1997-04-17 20:38:26 +0000
committerMarc G. Fournier <scrappy@hub.org>1997-04-17 20:38:26 +0000
commit8834795ebf68f0518f6498043e1c7f2abe81f8ec (patch)
treee5bf34f6e4bca71c5f57c889a714ab70cd3ee354 /src/backend/libpq/pqcomm.c
parenta1f229b19e95ceab78bbd06f7ef1bec92acbe8b4 (diff)
From: Raymond Toy <toy@rtp.ericsson.se>
Subject: [PATCHES] 970417: two more patches for large objects Here are two more patches: 1. pg_getint doesn't properly set the status flag when calling pqGetShort or pqGetLong. This is required when accessing large objects via libpq. This, combined with problem 1 above causes postgres to crash when postgres tries to print out the message that the status was not good. 2. ExceptionalCondition crashes when called with detail = NULL. This patch prevents dereferencing the NULL.
Diffstat (limited to 'src/backend/libpq/pqcomm.c')
-rw-r--r--src/backend/libpq/pqcomm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index dcd99cbe1b4..c0fa810e379 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.15 1997/04/16 06:25:13 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.16 1997/04/17 20:38:16 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -303,10 +303,10 @@ pq_getint(int b)
status = ((n = fgetc(Pfin)) == EOF);
break;
case 2:
- pqGetShort(&n, Pfin);
+ status = pqGetShort(&n, Pfin);
break;
case 4:
- pqGetLong(&n, Pfin);
+ status = pqGetLong(&n, Pfin);
break;
default:
fprintf(stderr, "** Unsupported size %d\n", b);