Re: (libpq) PQclear on questionable result pointer. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: (libpq) PQclear on questionable result pointer.
Date
Msg-id 6905.1030726916@sss.pgh.pa.us
Whole thread Raw
In response to (libpq) PQclear on questionable result pointer.  (wade <wade@wavefire.com>)
List pgsql-hackers
wade <wade@wavefire.com> writes:
> The problem arrises when the result object pointer you are passing to clear 
> contains not a null and not a valid result object address, but a junk pointer.
> PQclear() seg faults when the address is outside of the data segment.
> (libpq bug?)

No, that's a bug in *your* code.  Passing a bogus pointer to any library
anywhere will make it segfault, because there's no reasonable way to
verify a pointer.
        regards, tom lane


pgsql-hackers by date:

Previous
From: wade
Date:
Subject: (libpq) PQclear on questionable result pointer.
Next
From: Tom Lane
Date:
Subject: Re: make failure on cvs tip