Re: BUG #17858: ExecEvalArrayExpr() leaves uninitialised memory for multidim array with nulls
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: Richard Guo <guofenglinux@gmail.com>, pgsql-bugs@lists.postgresql.org
Date: 2023-03-26T17:44:41Z
Lists: pgsql-bugs
Alexander Lakhin <exclusion@gmail.com> writes: > So maybe the fix for the bug can be seen as a supplement for 18c0b4ecc. Yeah, I agree. Given that precedent, there's little excuse for ExecEvalArrayExpr not to use palloc0; the fact that it doesn't already was just an oversight in 18c0b4ecc. I realized that there's a completely separate way in which ExecEvalArrayExpr is a few bricks shy of a load: it fails to check for overflow of the output array size. Pushed the discussed changes along with a fix for that. regards, tom lane
Commits
-
Fix oversights in array manipulation.
- ae320fc21686 11.20 landed
- ad5fe7420594 12.15 landed
- 7c4873438fd4 15.3 landed
- 554841699f0e 16.0 landed
- 1bbbe14607c3 13.11 landed
- 11213d44663e 14.8 landed
-
Fix array- and path-creating functions to ensure padding bytes are zeroes.
- 18c0b4eccdc8 9.1.0 cited