]> git.ipfire.org Git - thirdparty/make.git/commit
[SV 59230] Ensure environment variables are exportable
authorPaul Smith <psmith@gnu.org>
Fri, 27 Nov 2020 21:56:22 +0000 (16:56 -0500)
committerPaul Smith <psmith@gnu.org>
Sun, 29 Nov 2020 22:55:32 +0000 (17:55 -0500)
commit19ae6fe72ace81bd16f02bd40635bbc766e53c95
tree5b0f730f4cd07c2ca775d966a6fa404b1ec26f09
parent0e020bbc24d89592e9ea15f9e8b887a71692eedf
[SV 59230] Ensure environment variables are exportable

When checking for invalid environment variable names we searched the
entire name string instead of just the first LENGTH chars; this could
cause us to incorrectly decide the variable was not exportable.

Dmitry Goncharov <dgoncharov@users.sf.net> found this bug and
provided a test case and sample fix: I used the test but chose a
slightly different fix.

* src/variable.c (define_variable_in_set): check the variable name
not the input string.
* tests/scripts/features/targetvars: Ensure environment variable
values are exported.
src/variable.c
tests/scripts/features/targetvars