aboutsummaryrefslogtreecommitdiff
path: root/src/include/fe_utils/string_utils.h
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2021-12-06 13:26:50 +0100
committerPeter Eisentraut <peter@eisentraut.org>2021-12-06 13:37:11 +0100
commite9e63b7022ddd0aaaae7cd439daa234cf9e6a21c (patch)
tree2f2af5e4f4c36e3f7146411116c5f56783db3146 /src/include/fe_utils/string_utils.h
parentd4596a20d046e800644d6027613c6a2cb5a6c35e (diff)
downloadpostgresql-e9e63b7022ddd0aaaae7cd439daa234cf9e6a21c.tar.gz
postgresql-e9e63b7022ddd0aaaae7cd439daa234cf9e6a21c.zip
Fix inappropriate uses of PG_GETARG_UINT32()
The chr() function used PG_GETARG_UINT32() even though the argument is declared as (signed) integer. As a result, you can pass negative arguments to this function and it internally interprets them as positive. Ultimately ends up being harmless, but it seems wrong, so fix this and rearrange the internal error checking a bit to accommodate this. Another case was in the documentation, where example code used PG_GETARG_UINT32() with an argument declared as signed integer. Reviewed-by: Nathan Bossart <bossartn@amazon.com> Discussion: https://www.postgresql.org/message-id/flat/7e43869b-d412-8f81-30a3-809783edc9a3%40enterprisedb.com
Diffstat (limited to 'src/include/fe_utils/string_utils.h')
0 files changed, 0 insertions, 0 deletions