summaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeMergeAppend.c
diff options
context:
space:
mode:
authorTomas Vondra <tomas.vondra@postgresql.org>2019-12-03 16:55:51 +0100
committerTomas Vondra <tomas.vondra@postgresql.org>2019-12-03 18:42:25 +0100
commitfabdad822287d6aac6a80fc57a97d38bd7456958 (patch)
tree6f3ba1b145225b317194546d2f8e1d398bbe5873 /src/backend/executor/nodeMergeAppend.c
parent283f095d0bff349682985bfa84c36e86c282a055 (diff)
Ensure maxlen is at leat 1 in dict_int
The dict_int text search dictionary template accepts maxlen parameter, which is then used to cap the length of input strings. The value was not properly checked, and the code simply does txt[d->maxlen] = '\0'; to insert a terminator, leading to segfaults with negative values. This commit simply rejects values less than 1. The issue was there since dct_int was introduced in 9.3, so backpatch all the way back to 9.4 which is the oldest supported version. Reported-by: cili Discussion: https://postgr.es/m/16144-a36a5bef7657047d@postgresql.org Backpatch-through: 9.4
Diffstat (limited to 'src/backend/executor/nodeMergeAppend.c')
0 files changed, 0 insertions, 0 deletions