From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Yeb Havinga <yebhavinga@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5748: Invalid oidvector data during binary recv
Date: Thu, 11 Nov 2010 17:36:22 +0200
Message-ID: <4CDC0D76.8070802@enterprisedb.com> (raw)
In-Reply-To: <201011111430.oABEUVPe067398@wwwmaster.postgresql.org>
References: <201011111430.oABEUVPe067398@wwwmaster.postgresql.org>
On 11.11.2010 16:30, Yeb Havinga wrote:
>
> The following bug has been logged online:
>
> Bug reference: 5748
> Logged by: Yeb Havinga
> Email address: yebhavinga@gmail.com
> PostgreSQL version: 9.0.1
> Operating system: Linux
> Description: Invalid oidvector data during binary recv
> Details:
>
> postgres=# create table a as select ''::oidvector;
> SELECT 1
> postgres=# copy a to '/tmp/test' with binary;
> COPY 1
> postgres=# copy a from '/tmp/test' with binary;
> ERROR: invalid oidvector data
>
> The error caused by the ARR_LBOUND(result)[0] != 0) check in oidvectorrecv,
> and after some debugging and looking at common values of the lbound, I
> wonder if this check itself is correct.
That check was added a while ago to make it impossible to inject values
into the system that the text input functions wouldn't accept. There is
no way to create an oidvector with non-zero lower bound through
oidvectorin. But it looks like the check is not right for an empty array.
Will fix, thanks for the report.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: heikki.linnakangas@enterprisedb.com, yebhavinga@gmail.com
Subject: Re: BUG #5748: Invalid oidvector data during binary recv
In-Reply-To: <4CDC0D76.8070802@enterprisedb.com>
References: <201011111430.oABEUVPe067398@wwwmaster.postgresql.org> <4CDC0D76.8070802@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox