postgresql/src/interfaces/ecpg/compatlib
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
..
.gitignore Build src/common files as a library with -fPIC. 2018-09-28 14:28:19 -04:00
Makefile Update copyright for 2024 2024-01-03 20:49:05 -05:00
exports.txt Fix inconsistencies in the code 2019-07-08 13:15:09 +09:00
informix.c 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