[PATCH] Memory leak in libPQquoteBytea-FU0lM6MGY0+V/[email protected]

"Pinchart, Laurent" <[email protected]>
Newsgroups gmane.comp.python.db.pypgsql.user
Message-ID <[email protected]>
Here's a patch that fixes a memory leak in [email protected]

Bytea are quoted using as much as 5 bytes per input byte (0x00 is quoted
'\\000'), so allocating (slen * 4) + 3 is not enough for data that contain
lots of 0x00 bytes.

The patch has been tested on Windows, with PyPgSQL compiled with VS6.

Laurent Pinchart
patch (application/octet-stream, 435 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.