[Toybox] [PATCH] macOS: replace local strnstr with strcasestr.

Rob Landley rob at landley.net
Mon Dec 3 11:33:17 PST 2018


On 12/3/18 12:00 PM, enh wrote:
> amusingly, the same line causes a (different) compile-time warning
> with old versions of glibc. glibc 2.15 at least has mktemp marked as
> warn_unused_result, and AOSP currently uses glibc 2.15 for host
> builds. i've sent a patch to fix that (and attached the same patch
> here too, in case the spam filter is still messing with you :-) ).

I enabled the header rewrite whatsis in the list plumbing and that seems to have
fixed the worst of it.

I was looking at doing my own mktemp with xgetrandom() but the x part says
"denial of service attack/exploit waiting to happen" when a script calls
NAME=$(mktemp) and gets an empty string with some discarded stderr output...

If bionic and musl _both_ don't warn about it, it's a glibc bug. Still annoying,
but I'll leave it for now and check if I still feel like trying to do something
about it during pre-release cleanup...

> someone's looking at upgrading the host glibc, but 2.15 is just inside
> the 7-year rule. plus i assume you'll be happy to save a line anyway.
> i'm not sure why i didn't write it as one line in the first place...
> even i don't find it obfuscatory in this case.

Applied.

Rob



More information about the Toybox mailing list