[Toybox] [PATCH] test applet, fix issues with the NOT operator
darken
darken at darken.eu
Sun Aug 14 05:32:41 PDT 2016
Issue 1:
If the "!" operator was not used in the `test` applets argument,
`int not` was never initialized before using it in `toys.exitval ^= not`,
According to a quick search the behavior of `not` is then undefined,
which could lead to inconsistent results (e.g. unexpected result inversion).
Issue 2:
The ! operator was being ignored if we return early due to the target not
existing.
Matthias
(first patch via mailing list, am I doing it right?)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20160814/4d8d2b84/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-test-applet-randomly-applying-operator.patch
Type: application/octet-stream
Size: 813 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20160814/4d8d2b84/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Fix-test-applet-NOT-operator.patch
Type: application/octet-stream
Size: 780 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20160814/4d8d2b84/attachment-0001.obj>
More information about the Toybox
mailing list