Buffer overflow in contrib/test_parser/test_parser.c - Mailing list pgsql-hackers

From Paul Guyot
Subject Buffer overflow in contrib/test_parser/test_parser.c
Date
Msg-id 4D0A6693-6021-4A91-AB4F-B5F1404F73DB@kallisys.net
Whole thread Raw
Responses Re: Buffer overflow in contrib/test_parser/test_parser.c  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hello,

There is a buffer overflow in sample code's test_parser.c that can yield to a segmentation fault. The next byte of the
bufferis tested against ' ' before its availability is checked. 

You will find attached a simple patch that fixes the bug.

Paul
--
Semiocast            http://semiocast.com/
+33.183627948 - 20 rue Lacaze, 75014 Paris

Attachment

pgsql-hackers by date:

Previous
From: Joel Jacobson
Date:
Subject: Generate call graphs in run-time
Next
From: Jim Nasby
Date:
Subject: Re: Generate call graphs in run-time