public inbox for [email protected]
help / color / mirror / Atom feedpgsql: ecpg: Fix zero-termination of string generated by intoasc()
6+ messages / 1 participants
[nested] [flat]
* pgsql: ecpg: Fix zero-termination of string generated by intoasc()
@ 2024-02-19 02:39 Michael Paquier <[email protected]>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2024-02-19 02:39 UTC (permalink / raw)
To: [email protected]
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/[email protected]
Backpatch-through: 12
Branch
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/c031ce97b561e79d3d91de9334ced561cc6c2571
Modified Files
--------------
src/interfaces/ecpg/compatlib/informix.c | 2 +-
.../ecpg/test/compat_informix/.gitignore | 2 ++
src/interfaces/ecpg/test/compat_informix/Makefile | 3 +-
.../ecpg/test/compat_informix/intoasc.pgc | 21 ++++++++++++
src/interfaces/ecpg/test/ecpg_schedule | 1 +
.../ecpg/test/expected/compat_informix-intoasc.c | 40 ++++++++++++++++++++++
.../test/expected/compat_informix-intoasc.stderr | 0
.../test/expected/compat_informix-intoasc.stdout | 2 ++
8 files changed, 69 insertions(+), 2 deletions(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: ecpg: Fix zero-termination of string generated by intoasc()
@ 2024-02-19 02:39 Michael Paquier <[email protected]>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2024-02-19 02:39 UTC (permalink / raw)
To: [email protected]
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/[email protected]
Backpatch-through: 12
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e77a1c58e338a1aebf00e3ae82d282f8bd32fe17
Modified Files
--------------
src/interfaces/ecpg/compatlib/informix.c | 2 +-
.../ecpg/test/compat_informix/.gitignore | 2 ++
src/interfaces/ecpg/test/compat_informix/Makefile | 3 +-
.../ecpg/test/compat_informix/intoasc.pgc | 21 ++++++++++++
.../ecpg/test/compat_informix/meson.build | 1 +
src/interfaces/ecpg/test/ecpg_schedule | 1 +
.../ecpg/test/expected/compat_informix-intoasc.c | 40 ++++++++++++++++++++++
.../test/expected/compat_informix-intoasc.stderr | 0
.../test/expected/compat_informix-intoasc.stdout | 2 ++
9 files changed, 70 insertions(+), 2 deletions(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: ecpg: Fix zero-termination of string generated by intoasc()
@ 2024-02-19 02:39 Michael Paquier <[email protected]>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2024-02-19 02:39 UTC (permalink / raw)
To: [email protected]
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/[email protected]
Backpatch-through: 12
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/a05bb9addb3770d07cc90ebfd5e2486e63647bce
Modified Files
--------------
src/interfaces/ecpg/compatlib/informix.c | 2 +-
.../ecpg/test/compat_informix/.gitignore | 2 ++
src/interfaces/ecpg/test/compat_informix/Makefile | 3 +-
.../ecpg/test/compat_informix/intoasc.pgc | 21 ++++++++++++
src/interfaces/ecpg/test/ecpg_schedule | 1 +
.../ecpg/test/expected/compat_informix-intoasc.c | 40 ++++++++++++++++++++++
.../test/expected/compat_informix-intoasc.stderr | 0
.../test/expected/compat_informix-intoasc.stdout | 2 ++
8 files changed, 69 insertions(+), 2 deletions(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: ecpg: Fix zero-termination of string generated by intoasc()
@ 2024-02-19 02:39 Michael Paquier <[email protected]>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2024-02-19 02:39 UTC (permalink / raw)
To: [email protected]
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/[email protected]
Backpatch-through: 12
Branch
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/771240f972ee7a3da8bbc3fa247e698144ecea15
Modified Files
--------------
src/interfaces/ecpg/compatlib/informix.c | 2 +-
.../ecpg/test/compat_informix/.gitignore | 2 ++
src/interfaces/ecpg/test/compat_informix/Makefile | 3 +-
.../ecpg/test/compat_informix/intoasc.pgc | 21 ++++++++++++
src/interfaces/ecpg/test/ecpg_schedule | 1 +
.../ecpg/test/expected/compat_informix-intoasc.c | 40 ++++++++++++++++++++++
.../test/expected/compat_informix-intoasc.stderr | 0
.../test/expected/compat_informix-intoasc.stdout | 2 ++
8 files changed, 69 insertions(+), 2 deletions(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: ecpg: Fix zero-termination of string generated by intoasc()
@ 2024-02-19 02:39 Michael Paquier <[email protected]>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2024-02-19 02:39 UTC (permalink / raw)
To: [email protected]
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/[email protected]
Backpatch-through: 12
Branch
------
REL_16_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/88e03d055d18c5f54f81589d13edc76945f0875c
Modified Files
--------------
src/interfaces/ecpg/compatlib/informix.c | 2 +-
.../ecpg/test/compat_informix/.gitignore | 2 ++
src/interfaces/ecpg/test/compat_informix/Makefile | 3 +-
.../ecpg/test/compat_informix/intoasc.pgc | 21 ++++++++++++
.../ecpg/test/compat_informix/meson.build | 1 +
src/interfaces/ecpg/test/ecpg_schedule | 1 +
.../ecpg/test/expected/compat_informix-intoasc.c | 40 ++++++++++++++++++++++
.../test/expected/compat_informix-intoasc.stderr | 0
.../test/expected/compat_informix-intoasc.stdout | 2 ++
9 files changed, 70 insertions(+), 2 deletions(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: ecpg: Fix zero-termination of string generated by intoasc()
@ 2024-02-19 02:39 Michael Paquier <[email protected]>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2024-02-19 02:39 UTC (permalink / raw)
To: [email protected]
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/[email protected]
Backpatch-through: 12
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/b5cb6022bbf0a748220a1086aa398214dfca7c6d
Modified Files
--------------
src/interfaces/ecpg/compatlib/informix.c | 2 +-
.../ecpg/test/compat_informix/.gitignore | 2 ++
src/interfaces/ecpg/test/compat_informix/Makefile | 3 +-
.../ecpg/test/compat_informix/intoasc.pgc | 21 ++++++++++++
src/interfaces/ecpg/test/ecpg_schedule | 1 +
.../ecpg/test/expected/compat_informix-intoasc.c | 40 ++++++++++++++++++++++
.../test/expected/compat_informix-intoasc.stderr | 0
.../test/expected/compat_informix-intoasc.stdout | 2 ++
8 files changed, 69 insertions(+), 2 deletions(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2024-02-19 02:39 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19 02:39 pgsql: ecpg: Fix zero-termination of string generated by intoasc() Michael Paquier <[email protected]>
2024-02-19 02:39 pgsql: ecpg: Fix zero-termination of string generated by intoasc() Michael Paquier <[email protected]>
2024-02-19 02:39 pgsql: ecpg: Fix zero-termination of string generated by intoasc() Michael Paquier <[email protected]>
2024-02-19 02:39 pgsql: ecpg: Fix zero-termination of string generated by intoasc() Michael Paquier <[email protected]>
2024-02-19 02:39 pgsql: ecpg: Fix zero-termination of string generated by intoasc() Michael Paquier <[email protected]>
2024-02-19 02:39 pgsql: ecpg: Fix zero-termination of string generated by intoasc() Michael Paquier <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox