mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	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.
This commit is contained in:
		@@ -3,7 +3,7 @@
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright (c) 2000-2003, PostgreSQL Global Development Group
 | 
					 * Copyright (c) 2000-2003, PostgreSQL Global Development Group
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.76.2.1 2003/11/12 22:55:42 tgl Exp $
 | 
					 * $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.76.2.2 2006/11/22 21:13:11 tgl Exp $
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include "postgres_fe.h"
 | 
					#include "postgres_fe.h"
 | 
				
			||||||
#include "common.h"
 | 
					#include "common.h"
 | 
				
			||||||
@@ -556,7 +556,7 @@ PrintQueryResults(PGresult *results)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		case PGRES_COMMAND_OK:
 | 
							case PGRES_COMMAND_OK:
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				char		buf[10];
 | 
									char		buf[16];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				success = true;
 | 
									success = true;
 | 
				
			||||||
				sprintf(buf, "%u", (unsigned int) PQoidValue(results));
 | 
									sprintf(buf, "%u", (unsigned int) PQoidValue(results));
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user