aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/basics.source
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-04-18 11:20:50 +0900
committerMichael Paquier <michael@paquier.xyz>2023-04-18 11:20:50 +0900
commit02f0764546a9ce7f3d843e049bdfa790afa1cf4a (patch)
treedd223466dac02b6dbd0f4cea500093a28f539f05 /src/tutorial/basics.source
parent72a914e9fb7353e17776a2692fb21cff49725400 (diff)
downloadpostgresql-02f0764546a9ce7f3d843e049bdfa790afa1cf4a.tar.gz
postgresql-02f0764546a9ce7f3d843e049bdfa790afa1cf4a.zip
ecpg: Fix handling of strings in ORACLE compat code with SQLDA
When compiled with -C ORACLE, ecpg_get_data() had a one-off issue where it would incorrectly store the null terminator byte to str[-1] when varcharsize is 0, which is something that can happen when using SQLDA. This would eat 1 byte from the previous field stored, corrupting the results generated. All the callers of ecpg_get_data() estimate and allocate enough storage for the data received, and the fix of this commit relies on this assumption. Note that this maps to the case where no padding or truncation is required. This issue has been introduced by 3b7ab43 with the Oracle compatibility option, so backpatch down to v11. Author: Kyotaro Horiguchi Discussion: https://postgr.es/m/20230410.173500.440060475837236886.horikyota.ntt@gmail.com Backpatch-through: 11
Diffstat (limited to 'src/tutorial/basics.source')
0 files changed, 0 insertions, 0 deletions