Re: [HACKERS] Buffer overflow in contrib/test_parser/test_parser.c

2012-01-09 Thread Tom Lane
Paul Guyot writes: > There is a buffer overflow in sample code's test_parser.c that can yield to a > segmentation fault. The next byte of the buffer is tested against ' ' before > its availability is checked. Hmm, yeah. The probability of a failure is very low of course, but still it'd be bett

[HACKERS] Buffer overflow in contrib/test_parser/test_parser.c

2012-01-09 Thread Paul Guyot
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 buffer is tested against ' ' before its availability is checked. You will find attached a simple patch that fixes the bug. Paul -- Semiocasthttp://semiocas