Re: postgres 9.0 beta libpq empty binary array error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: vshahov(at)alliedtesting(dot)com, pgsql-bugs(at)postgresql(dot)org, pgagarinov(at)alliedtesting(dot)com, depstein(at)alliedtesting(dot)com
Subject: Re: postgres 9.0 beta libpq empty binary array error
Date: 2010-08-09 18:26:22
Message-ID: 10381.1281378382@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> The behavior of empty arrays with dimensions is weird in general.

Agreed, but we shouldn't be introducing random restrictions in the name
of security.

Patch looks good to me, except that it occurs to me to wonder about
negative values of dim[i]. For small negative values this coding
will catch it, but what if it's large enough to overflow the other way?
Maybe use

if (dim[i] < 0 || lBound[i] > ub)
ereport...

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2010-08-09 18:29:10 Re: postgres 9.0 beta libpq empty binary array error
Previous Message Heikki Linnakangas 2010-08-09 18:18:04 Re: postgres 9.0 beta libpq empty binary array error