On Thu, Feb 8, 2018 at 1:55 PM, daggs <[email protected]> wrote:
> I've tested the implementation on 1.28.0 with the two following patches:
> https://git.busybox.net/busybox/commit/shell/hush.c?id=b8d076b00bad9da87e6dcaf4f36dfd06e2d2e5e8
> https://git.busybox.net/busybox/commit/shell/hush.c?id=6aad1ddcc9d8fe2303cc444b6ddea2af1fc1dd30
> on the test script I've posted in the first mail and the output is as follows:
> $ ./busybox hush test.sh
> hush: using fallback suid method
> at line 5
> at line 6
> at line 6
> at line 6
> at line 6
> at line 6
> at line 6
> at line 6
> at line 6
> at line 6
> at line 6
> at line 10
> hello world 10
>
> that differs from the bash output, the line that is printed most is actually 
> in line 7 and not 6.
> I think this implementation suffers from a similar but my implementation 
> suffered.


Reproduced.

while ....; do
    echo ...
done

hush parser thinks that the command is "do echo ..." :) and therefore
it starts on line-1.

Fixed in git, please try now.
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to