Skip site navigation (1) Skip section navigation (2)

Re: small fix to possible null pointer dereference in byteaout() varlena.c

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: small fix to possible null pointer dereference in byteaout() varlena.c
Date: 2010-09-28 15:07:42
Message-ID: 24626.1285686462@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
=?UTF-8?Q?Grzegorz_Ja=C5=9Bkiewicz?= <gryzman(at)gmail(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-09-28 15:14:43
Subject: Re: security label support, revised
Previous:From: Peter EisentrautDate: 2010-09-28 14:56:20
Subject: Re: security label support, revised

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group