Re: [PATCH v2] expand: Fix multiple issues with EXP_DISCARD in evalvar

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I encountered another bug, introduced by 3cd5386 and not fixed by v2 of this patch: the presence of a length-counting expansion like ${#foo} in a string causes the rest of the string to be discarded.

$ src/dash -c 'foo=bar; echo "baz ${#foo} quux"'
baz 3
$ src/dash -c 'foo=bar; echo baz\ ${#foo}\ quux'
baz 3

(expected outout: baz 3 quux)

- Martijn



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux