postgresql/contrib/hstore
Michael Paquier a6f823e778 hstore: Fix NULL pointer dereference with receive function
The receive function of hstore was not able to handle correctly
duplicate key values when a new duplicate links to a NULL value, where a
pfree() could be attempted on a NULL pointer, crashing due to a pointer
dereference.

This problem would happen for a COPY BINARY, when stacking values like
that:
aa => 5
aa => null

The second key/value pair is discarded and pfree() calls are attempted
on its key and its value, leading to a pointer dereference for the value
part as the value is NULL.  The first key/value pair takes priority when
a duplicate is found.

Per offline report.

Reported-by: "Anemone" <vergissmeinnichtzh@gmail.com>
Reported-by: "A1ex" <alex000young@gmail.com>
Backpatch-through: 14
2026-02-17 08:41:26 +09:00
..
data Add GIN support for pg_trgm. From Guillaume Smet <guillaume.smet@gmail.com> 2007-03-14 14:21:53 +00:00
expected Force standard_conforming_strings to always be ON. 2026-01-21 15:08:38 -05:00
sql Force standard_conforming_strings to always be ON. 2026-01-21 15:08:38 -05:00
.gitignore Support "make check" in contrib 2011-04-25 22:27:11 +03:00
hstore--1.1--1.2.sql Make contrib modules' installation scripts more secure. 2020-08-10 10:44:42 -04:00
hstore--1.2--1.3.sql Introduce jsonb, a structured format for storing json. 2014-03-23 16:40:19 -04:00
hstore--1.3--1.4.sql Make contrib modules' installation scripts more secure. 2020-08-10 10:44:42 -04:00
hstore--1.4--1.5.sql Distinguish selectivity of < from <= and > from >=. 2017-09-13 11:12:39 -04:00
hstore--1.4.sql Update extensions with GIN/GIST support for parallel query. 2016-06-14 13:34:37 -04:00
hstore--1.5--1.6.sql Add a 64-bit hash function for type hstore. 2018-11-23 13:37:34 -05:00
hstore--1.6--1.7.sql Improve selectivity estimation for assorted match-style operators. 2020-04-01 10:32:33 -04:00
hstore--1.7--1.8.sql Remove deprecated containment operators for contrib types. 2021-03-05 10:45:41 -05:00
hstore.control Allow subscripting of hstore values. 2020-12-11 18:58:21 -05:00
hstore.h Fix final warnings produced by -Wshadow=compatible-local 2022-10-07 13:13:27 +13:00
hstore_compat.c Replace most StaticAssertStmt() with StaticAssertDecl() 2025-12-12 10:06:40 +01:00
hstore_gin.c Mark commented out code as unused 2026-01-22 12:44:07 +01:00
hstore_gist.c Mark commented out code as unused 2026-01-22 12:44:07 +01:00
hstore_io.c hstore: Fix NULL pointer dereference with receive function 2026-02-17 08:41:26 +09:00
hstore_op.c Fix varatt versus Datum type confusions 2025-08-05 12:11:36 +02:00
hstore_subs.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
Makefile hstore: Tighten key/value parsing check for whitespaces 2023-06-12 09:14:03 +09:00
meson.build Update copyright for 2026 2026-01-01 13:24:10 -05:00