aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/common.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-11-22 21:13:04 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-11-22 21:13:04 +0000
commitdb8a3fd68038907efb47d0ad3de5e037c9594b7c (patch)
tree5c1cbf79dfac7279dd66ed280923e769b7c780cd /src/bin/psql/common.c
parentb8222e50062937d38de38d54782c013cd136bfe4 (diff)
downloadpostgresql-db8a3fd68038907efb47d0ad3de5e037c9594b7c.tar.gz
postgresql-db8a3fd68038907efb47d0ad3de5e037c9594b7c.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.
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 c98322ca4c0..90eb0238d7a 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.95.4.1 2005/11/04 18:35:51 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.95.4.2 2006/11/22 21:13:04 tgl Exp $
*/
#include "postgres_fe.h"
#include "common.h"
@@ -892,7 +892,7 @@ PrintQueryResults(PGresult *results)
case PGRES_COMMAND_OK:
{
- char buf[10];
+ char buf[16];
success = true;
snprintf(buf, sizeof(buf),