Re: small fix to possible null pointer dereference in byteaout() varlena.c - Mailing list pgsql-hackers

From Tom Lane
Subject Re: small fix to possible null pointer dereference in byteaout() varlena.c
Date
Msg-id 24626.1285686462@sss.pgh.pa.us
Whole thread Raw
In response to small fix to possible null pointer dereference in byteaout() varlena.c  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
Responses Re: small fix to possible null pointer dereference in byteaout() varlena.c
List pgsql-hackers
Grzegorz Jaśkiewicz <gryzman@gmail.com> writes:
> It would crash if input is of unrecognized format. Probably than
> there's going to be more problems to be concerned with, but just in
> case, don't crash in

I'm not sure why you think this is a good change, but it would break
things: in particular, the code would fail to null-terminate the string
in the hex-output case.  Also, the case that you seem to be trying to
defend against can't happen because elog(ERROR) doesn't return.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: security label support, revised
Next
From: Tom Lane
Date:
Subject: Re: security label support, revised