[PATCH] Dereference null return value (NULL_RETURNS) (src/backend/commands/statscmds.c) - Mailing list pgsql-hackers

From Ranier Vilela
Subject [PATCH] Dereference null return value (NULL_RETURNS) (src/backend/commands/statscmds.c)
Date
Msg-id CAEudQAoMH_R0WaBvDsFL8fz_TLQ4cwhu3v8y1R-1kDsFjzxg8Q@mail.gmail.com
Whole thread Raw
Responses Re: [PATCH] Dereference null return value (NULL_RETURNS) (src/backend/commands/statscmds.c)  (Ranier Vilela <ranier.vf@gmail.com>)
List pgsql-hackers
Hi Tom,

Per Coverity.

The SearchSysCache1 allows return NULL and at function AlterStatistics,
has one mistake, lack of, check of return, which enables a dereference NULL pointer,
at function heap_modify_tuple.

While there is room for improvement.
Avoid calling SearchSysCache1 and table_open if the user "is not the owner of the existing statistics object".

regards,
Ranier Vilela

Attachment

pgsql-hackers by date:

Previous
From: Rahila
Date:
Subject: Re: More tests with USING INDEX replident and dropped indexes
Next
From: Andres Freund
Date:
Subject: Re: Hybrid Hash/Nested Loop joins and caching results from subplans