aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-11-22 21:12:57 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-11-22 21:12:57 +0000
commitc4950aa1eeb62b6661b4fb1fc1edb53dba96f98d (patch)
treecaa7bf5b13f785aac93d217d2409d5d07230ef43
parent504d87c7cd7cba2a8ecd9d49e933c62e9b04eafd (diff)
downloadpostgresql-c4950aa1eeb62b6661b4fb1fc1edb53dba96f98d.tar.gz
postgresql-c4950aa1eeb62b6661b4fb1fc1edb53dba96f98d.zip
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.
-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 1324e557b03..e5b545a4cfa 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.110.2.3 2006/06/30 16:55:41 alvherre Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.110.2.4 2006/11/22 21:12:57 tgl Exp $
*/
#include "postgres_fe.h"
#include "common.h"
@@ -903,7 +903,7 @@ PrintQueryResults(PGresult *results)
case PGRES_COMMAND_OK:
{
- char buf[10];
+ char buf[16];
success = true;
snprintf(buf, sizeof(buf),