diff options
author | Andrew Gierth <rhodiumtoad@postgresql.org> | 2018-08-23 20:00:12 +0100 |
---|---|---|
committer | Andrew Gierth <rhodiumtoad@postgresql.org> | 2018-08-23 21:33:55 +0100 |
commit | ad871a9d78841592938a0b24cc961fd1d4185607 (patch) | |
tree | f9049fded8395715073f56ae1bd25a1c8beb2d11 /src/backend/utils/adt/regexp.c | |
parent | 6120f2234d7699849a429e5881fdb242fb6b941e (diff) | |
download | postgresql-ad871a9d78841592938a0b24cc961fd1d4185607.tar.gz postgresql-ad871a9d78841592938a0b24cc961fd1d4185607.zip |
Reduce an unnecessary O(N^3) loop in lexer.
The lexer's handling of operators contained an O(N^3) hazard when
dealing with long strings of + or - characters; it seems hard to
prevent this case from being O(N^2), but the additional N multiplier
was not needed.
Backpatch all the way since this has been there since 7.x, and it
presents at least a mild hazard in that trying to do Bind, PREPARE or
EXPLAIN on a hostile query could take excessive time (without
honouring cancels or timeouts) even if the query was never executed.
Diffstat (limited to 'src/backend/utils/adt/regexp.c')
0 files changed, 0 insertions, 0 deletions