pgsql: This routine was calling ecpg_alloc to allocate to memory but di

Started by Michael Meskesover 11 years ago4 messagescomitters
Jump to latest
#1Michael Meskes
meskes@postgresql.org

This routine was calling ecpg_alloc to allocate to memory but did not
actually check the returned pointer allocated, potentially NULL which
could be the result of a malloc call.

Issue noted by Coverity, fixed by Michael Paquier <michael@otacoo.com>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5ee5bc387319b9ac33083bacebd3ab7046666328

Modified Files
--------------
src/interfaces/ecpg/ecpglib/descriptor.c | 6 ++----
src/interfaces/ecpg/ecpglib/execute.c | 6 ++----
src/interfaces/ecpg/ecpglib/extern.h | 4 ++--
src/interfaces/ecpg/ecpglib/memory.c | 22 +++++++++++++++++++++-
4 files changed, 27 insertions(+), 11 deletions(-)

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

#2Michael Paquier
michael@paquier.xyz
In reply to: Michael Meskes (#1)
Re: pgsql: This routine was calling ecpg_alloc to allocate to memory but di

On Thu, Feb 5, 2015 at 11:14 PM, Michael Meskes <meskes@postgresql.org> wrote:

This routine was calling ecpg_alloc to allocate to memory but did not
actually check the returned pointer allocated, potentially NULL which
could be the result of a malloc call.

Issue noted by Coverity, fixed by Michael Paquier <michael@otacoo.com>

Coming back to it, perhaps this meritates a backpatch? Even if that's
unlikely to happen...
--
Michael

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

#3Michael Meskes
meskes@postgresql.org
In reply to: Michael Paquier (#2)
Re: pgsql: This routine was calling ecpg_alloc to allocate to memory but di

On 23.07.2015 09:19, Michael Paquier wrote:

On Thu, Feb 5, 2015 at 11:14 PM, Michael Meskes <meskes@postgresql.org> wrote:

This routine was calling ecpg_alloc to allocate to memory but did not
actually check the returned pointer allocated, potentially NULL which
could be the result of a malloc call.

Issue noted by Coverity, fixed by Michael Paquier <michael@otacoo.com>

Coming back to it, perhaps this meritates a backpatch? Even if that's
unlikely to happen...

cherry-picked and pushed to all back branches.

Sorry, the disadvantage of testing in master for a while, I simply
forgot about this change.

Michael

--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at gmail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL

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

#4Michael Paquier
michael@paquier.xyz
In reply to: Michael Meskes (#3)
Re: pgsql: This routine was calling ecpg_alloc to allocate to memory but di

On Wed, Aug 12, 2015 at 8:59 PM, Michael Meskes <meskes@postgresql.org> wrote:

On 23.07.2015 09:19, Michael Paquier wrote:

On Thu, Feb 5, 2015 at 11:14 PM, Michael Meskes <meskes@postgresql.org> wrote:

This routine was calling ecpg_alloc to allocate to memory but did not
actually check the returned pointer allocated, potentially NULL which
could be the result of a malloc call.

Issue noted by Coverity, fixed by Michael Paquier <michael@otacoo.com>

Coming back to it, perhaps this meritates a backpatch? Even if that's
unlikely to happen...

cherry-picked and pushed to all back branches.

Sorry, the disadvantage of testing in master for a while, I simply
forgot about this change.

No pb. Thanks! I forgot myself...
--
Michael

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