Re: pgsql: Fix crash in json_to_record().

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Jeff Davis <jdavis(at)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix crash in json_to_record().
Date: 2014-02-26 19:26:06
Message-ID: 20140226192606.GK2921@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

* Jeff Davis (jdavis(at)postgresql(dot)org) wrote:
> Fix crash in json_to_record().
>
> json_to_record() depends on get_call_result_type() for the tuple
> descriptor of the record that should be returned, but in some cases
> that cannot be determined. Add a guard to check if the tuple
> descriptor has been properly resolved, similar to other callers of
> get_call_result_type().
>
> Also add guard for two other callers of get_call_result_type() in
> jsonfuncs.c. Although json_to_record() is the only actual bug, it's a
> good idea to follow convention.

Ah, awesome, thanks. I had it in my notes to go check that as Coverity
had complained about it and now I don't have to. Thanks again!

Stephen

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2014-02-27 14:31:18 Re: pgsql: Introduce replication slots.
Previous Message Heikki Linnakangas 2014-02-26 16:50:05 pgsql: btbuild no longer calls _bt_doinsert(), update comment.