postgresql/src/interfaces/ecpg
Peter Eisentraut d35cd06199 Fix overflow in parsing of positional parameter
Replace atol with pg_strtoint32_safe in the backend parser and with
strtoint in ECPG to reject overflows when parsing the number of a
positional parameter.  With atol from glibc, parameters $2147483648 and
$4294967297 turn into $-2147483648 and $1, respectively.

Author: Erik Wienhold <ewie@ewie.name>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Reviewed-by: Alexander Lakhin <exclusion@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/5d216d1c-91f6-4cbe-95e2-b4cbd930520c@ewie.name
2024-07-02 09:29:26 +02:00
..
compatlib ecpg: Fix return code for overflow in numeric conversion 2024-03-25 14:18:36 +01:00
ecpglib Remove race conditions between ECPGdebug() and ecpg_log(). 2024-05-23 15:52:06 -04:00
include Remove obsolete symbol from ecpg_config.h.in 2024-04-24 08:27:25 +02:00
pgtypeslib ecpg: Fix error handling on OOMs when parsing timestamps 2024-02-19 09:05:51 +09:00
preproc Fix overflow in parsing of positional parameter 2024-07-02 09:29:26 +02:00
test Make two-phase tests of ECPG and main suite more concurrent-proof 2024-04-29 21:10:41 +09:00
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
README.dynSQL Fix whitespace issues found by git diff --check, add gitattributes 2013-11-10 14:48:29 -05:00

src/interfaces/ecpg/README.dynSQL

descriptor statements have the following shortcomings

- input descriptors (USING DESCRIPTOR <name>) are not supported

  Reason: to fully support dynamic SQL the frontend/backend communication
          should change to recognize input parameters.
          Since this is not likely to happen in the near future and you
          can cover the same functionality with the existing infrastructure
          (using s[n]printf), I'll leave the work to someone else.