1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-25 21:42:33 +03:00
Tomas Vondra a8a8c6b296 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
2019-12-03 18:40:48 +01:00
..
2019-01-02 12:44:25 -05:00
2019-01-02 12:44:25 -05:00
2019-05-22 13:04:48 -04:00
2019-06-03 13:44:03 +09:00
2019-05-22 12:55:34 -04:00
2019-05-22 13:04:48 -04:00
2019-01-02 12:44:25 -05:00
2019-05-22 13:04:48 -04:00
2019-01-02 12:44:25 -05:00
2019-01-02 12:44:25 -05:00
2017-09-14 22:22:59 -04:00
2019-05-22 13:04:48 -04:00
2019-05-22 13:04:48 -04:00
2019-05-22 13:04:48 -04:00
2017-06-21 15:35:54 -04:00
2019-05-22 13:04:48 -04:00
2019-01-02 12:44:25 -05:00
2019-09-23 13:37:33 +02:00
2019-01-02 12:44:25 -05:00
2019-05-22 13:04:48 -04:00
2018-04-03 09:47:18 -04:00

The PostgreSQL contrib tree
---------------------------

This subtree contains porting tools, analysis utilities, and plug-in
features that are not part of the core PostgreSQL system, mainly
because they address a limited audience or are too experimental to be
part of the main source tree.  This does not preclude their
usefulness.

User documentation for each module appears in the main SGML
documentation.

When building from the source distribution, these modules are not
built automatically, unless you build the "world" target.  You can
also build and install them all by running "make all" and "make
install" in this directory; or to build and install just one selected
module, do the same in that module's subdirectory.

Some directories supply new user-defined functions, operators, or
types.  To make use of one of these modules, after you have installed
the code you need to register the new SQL objects in the database
system by executing a CREATE EXTENSION command.  In a fresh database,
you can simply do

    CREATE EXTENSION module_name;

See the PostgreSQL documentation for more information about this
procedure.