postgresql/src/interfaces/ecpg/test
Michael Paquier e77a1c58e3 ecpg: Fix zero-termination of string generated by intoasc()
intoasc(), a wrapper for PGTYPESinterval_to_asc that converts an
interval to its textual representation, used a plain memcpy() when
copying its result.  This could miss a zero-termination in the result
string, leading to an incorrect result.

The routines in informix.c do not provide the length of their result
buffer, which would allow a replacement of strcpy() to safer strlcpy()
calls, but this requires an ABI breakage and that cannot happen in
back-branches.

Author: Oleg Tselebrovskiy
Reviewed-by: Ashutosh Bapat
Discussion: https://postgr.es/m/bf47888585149f83b276861a1662f7e4@postgrespro.ru
Backpatch-through: 12
2024-02-19 11:38:18 +09:00
..
compat_informix ecpg: Fix zero-termination of string generated by intoasc() 2024-02-19 11:38:18 +09:00
compat_oracle Update copyright for 2024 2024-01-03 20:49:05 -05:00
connect Update copyright for 2024 2024-01-03 20:49:05 -05:00
expected ecpg: Fix zero-termination of string generated by intoasc() 2024-02-19 11:38:18 +09:00
performance Remove unnecessary parentheses in return statements 2017-09-05 14:52:55 -04:00
pgtypeslib Update copyright for 2024 2024-01-03 20:49:05 -05:00
preproc Update copyright for 2024 2024-01-03 20:49:05 -05:00
sql Update copyright for 2024 2024-01-03 20:49:05 -05:00
thread Update copyright for 2024 2024-01-03 20:49:05 -05:00
.gitignore Still more .gitignore cleanup. 2010-09-24 13:48:15 -04:00
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.regress Ensure link commands list *.o files before LDFLAGS. 2019-01-02 13:57:54 -05:00
ecpg_schedule ecpg: Fix zero-termination of string generated by intoasc() 2024-02-19 11:38:18 +09:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_regress_ecpg.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
printf_hack.h Un-break ecpg tests for Windows. 2019-06-02 11:07:54 -04:00
regression.h Initial pgindent run with pg_bsd_indent version 2.0. 2017-06-21 14:39:04 -04:00