]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Zero-fill private_data when attaching an injection point
authorMichael Paquier <michael@paquier.xyz>
Fri, 10 Apr 2026 02:17:32 +0000 (11:17 +0900)
committerMichael Paquier <michael@paquier.xyz>
Fri, 10 Apr 2026 02:17:32 +0000 (11:17 +0900)
commit492c386b4df465df8ebb9347e1579ad1b96bf41a
treee9c76ae9d34d5df792c5219f2ccd8330cc3b58fb
parentf8736f8bc5315fe94cba961825acc3552f8064b0
Zero-fill private_data when attaching an injection point

InjectionPointAttach() did not initialize the private_data buffer of the
shared memory entry before (perhaps partially) overwriting it.  When the
private data is set to NULL by the caler, the buffer was left
uninitialized.  If set, it could have stale contents.

The buffer is initialized to zero, so as the contents recorded when a
point is attached are deterministic.

Author: Sami Imseih <samimseih@gmail.com>
Discussion: https://postgr.es/m/CAA5RZ0tsGHu2h6YLnVu4HiK05q+gTE_9WVUAqihW2LSscAYS-g@mail.gmail.com
Backpatch-through: 17
src/backend/utils/misc/injection_point.c