]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix a very long-standing error in handling .SHELL targets: this target
authorHartmut Brandt <harti@FreeBSD.org>
Thu, 25 Nov 2004 10:01:26 +0000 (10:01 +0000)
committerHartmut Brandt <harti@FreeBSD.org>
Thu, 25 Nov 2004 10:01:26 +0000 (10:01 +0000)
commit21d15001f9d130fca97c368d713413d573aeedb9
treea248c2c621583d2bdd082d0c72936272d50495bb
parentde4cbbf593ed1b3e905d95edb37661f3e9806086
Fix a very long-standing error in handling .SHELL targets: this target
uses the brk_string function to parse the line. That function uses static
storage for both the expanded string and the returned argv[] vector.
The JobParseShell function simply stored away pointers into this static
storage. On the next use of something like ${FOO:O} this storage would
get overwritten with fatal results.

This also allows us to make the shells[] array const bringing us one step
further in making make WARNS=4 ready.
usr.bin/make/job.c