Re: Returning non-terminated string in ECPG Informix-compatible function
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Oleg Tselebrovskiy <o.tselebrovskiy@postgrespro.ru>
Cc: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, pgsql-hackers@postgresql.org
Date: 2024-02-19T03:20:12Z
Lists: pgsql-hackers
On Thu, Feb 15, 2024 at 05:17:17PM +0700, Oleg Tselebrovskiy wrote: > Thanks for review! dt_common.c is quite amazing, the APIs that we have in it rely on strcpy() but we have no idea of the length of the buffer string given in input to store the result. This would require breaking the existing APIs or inventing new ones to be able to plug some safer strlcpy() calls. Not sure if it's really worth bothering. For now, I've applied the OOM checks on HEAD and the fix with the null termination on all stable branches. -- Michael
Commits
-
ecpg: Fix zero-termination of string generated by intoasc()
- 771240f972ee 12.19 landed
- c031ce97b561 13.15 landed
- a05bb9addb37 14.12 landed
- b5cb6022bbf0 15.7 landed
- 88e03d055d18 16.3 landed
- e77a1c58e338 17.0 landed
-
ecpg: Fix error handling on OOMs when parsing timestamps
- 0a9118ccc0eb 17.0 landed