[PATCHES] Check for failed memory allocations in libpq

2003-07-31 Thread Dave Allen
Attached is a patch (against 7.3.4) to check the return values of some calls (malloc, realloc, etc.) for failed memory allocations in libpq. -- Dave Allen [EMAIL PROTECTED] --- postgresql-7.3.4-orig/src/interfaces/libpq/fe-exec.cWed Sep 4 13:31:47 2002 +++

Re: [PATCHES] Check for failed memory allocations in libpq

2003-07-31 Thread Tom Lane
Dave Allen [EMAIL PROTECTED] writes: Attached is a patch (against 7.3.4) to check the return values of some calls (malloc, realloc, etc.) for failed memory allocations in libpq. You sure you aren't just trading one misbehavior for another? The change in PQmakeEmptyPGresult, for example, just

Re: [PATCHES] Check for failed memory allocations in libpq

2003-07-31 Thread Dave Allen
Apologies if I missed anything, but I thought I fixed any callers of PQmakeEmptyPQresult that weren't already checking (parseInput and getRowDescriptions were the only ones). I of course can't fix any applications I don't have the source for, but if I missed something in libpq, I'd be more than

Re: [PATCHES] Check for failed memory allocations in libpq

2003-07-31 Thread Tom Lane
Dave Allen [EMAIL PROTECTED] writes: You sure you aren't just trading one misbehavior for another? Apologies if I missed anything, but I thought I fixed any callers of PQmakeEmptyPQresult that weren't already checking (parseInput and getRowDescriptions were the only ones). Well, I'm