summaryrefslogtreecommitdiff
path: root/src/bin/psql/common.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-11-22 21:13:16 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-11-22 21:13:16 +0000
commit0951ff33b5361f1430e366b4f799ec1682e001d1 (patch)
tree3673d1bee65095436d073c303d55051e296b250b /src/bin/psql/common.c
parent53d7eece13f9e5f6c3a5e9594ef62ff4509995ca (diff)
Fix 1-byte buffer overrun when OID exceeds 1 billion. This probably can't
cause any serious harm in normal cases, but if you have gcc buffer overrun checking turned on, that will notice. Found by Jack Orenstein. Problem was already fixed in CVS HEAD.
Diffstat (limited to 'src/bin/psql/common.c')
-rw-r--r--src/bin/psql/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index 55af65a3ae1..64eac98a616 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.51 2002/10/29 19:35:33 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.51.2.1 2006/11/22 21:13:16 tgl Exp $
*/
#include "postgres_fe.h"
#include "common.h"
@@ -439,7 +439,7 @@ SendQuery(const char *query)
break;
case PGRES_COMMAND_OK:
{
- char buf[10];
+ char buf[16];
success = true;
sprintf(buf, "%u", (unsigned int) PQoidValue(results));