pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: petrum@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #14186: Inconsistent code modification
Date: Mon, 13 Jun 2016 16:31:59 +0000
Message-ID: <20160613163159.5798.52928@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      14186
Logged by:          Petru-Florin Mihancea
Email address:      petrum@gmail.com
PostgreSQL version: 9.4.4
Operating system:   Macosx
Description:        

File: postgresql-9.4.4/src/backend/catalog/aclchk.c
Function: pg_type_aclmask (line 4200)

At lines 4236, I think elttype_oid should be used and not type_oid. The code
is bellow:

  tuple = SearchSysCache1(TYPEOID, ObjectIdGetDatum(elttype_oid));
                if (!HeapTupleIsValid(tuple))
                        ereport(ERROR,
                                        (errmsg("type with OID %u does not
exist",
                                                        type_oid))); <<<
POTENTIAL PROBLEM

It is searched for elttype_oid and thus elttype_oid should probably be
reported that is not found. Before this fragment, a similar search is done
for type_oid and type_oid is reported as not found (lines 4218-4222 but not
copied here). Flowing the same idea,  elttype_oid should be used in the
presented case. I found this issue using a CodeSonar plugin I develop.

Regards,
Pepi


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


view thread (2+ messages)  latest in thread

Message-ID: <20160613163159.5798.52928@wrigleys.postgresql.org>
Permalink:  ../20160613163159.5798.52928@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20160613163159.5798.52928@wrigleys.postgresql.org

 · 

reply

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: petrum@gmail.com
  Subject: Re: BUG #14186: Inconsistent code modification
  In-Reply-To: <20160613163159.5798.52928@wrigleys.postgresql.org>
  References: <20160613163159.5798.52928@wrigleys.postgresql.org>

* 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