]> git.ipfire.org Git - thirdparty/make.git/commit
[SV 65172] Avoid buffer overruns when expanding for $(shell ...)
authorPaul Smith <psmith@gnu.org>
Thu, 18 Jan 2024 22:54:59 +0000 (17:54 -0500)
committerPaul Smith <psmith@gnu.org>
Sat, 27 Jan 2024 21:40:36 +0000 (16:40 -0500)
commit25049fef16d7ccac1836443cb2888231a4d694b5
tree83c120234e032b4851ba374d91428d9bf26dc027
parent31036e648f4a92ae0cce215eb3d60a1311a09c60
[SV 65172] Avoid buffer overruns when expanding for $(shell ...)

Reported-by: MIAOW Miao <guoyr_2013@hotmail.com>
Patch from: Henrik Carlqvist <hc981@poolhem.se>
Test from: Dmitry Goncharov <dgoncharov@users.sf.net>

* src/expand.c (recursively_expand_for_file): Check the variable name
before checking for equality so we don't overrun the buffer.
* tests/scripts/functions/shell: Add a test with a very long variable.
src/expand.c
tests/scripts/functions/shell