Skip site navigation (1) Skip section navigation (2)

pgsql: Fix one-byte buffer overrun in contrib/test_parser.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix one-byte buffer overrun in contrib/test_parser.
Date: 2012-01-10 00:59:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Fix one-byte buffer overrun in contrib/test_parser.

The original coding examined the next character before verifying that
there *is* a next character.  In the worst case with the input buffer
right up against the end of memory, this would result in a segfault.

Problem spotted by Paul Guyot; this commit extends his patch to fix an
additional case.  In addition, make the code a tad more readable by not
overloading the usage of *tlen.



Modified Files
contrib/test_parser/test_parser.c |   19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)

pgsql-committers by date

Next:From: User FxjrDate: 2012-01-10 03:14:13
Subject: npgsql - Npgsql2: Fixed tabulation.
Previous:From: Peter EisentrautDate: 2012-01-09 19:14:11
Subject: pgsql: Add compatibility note about grant options on GRANT referencepa

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group