<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">portability.c/getdelim under _APPLE_ & __ANDROID__ looks like it has<br>
several glitches I find it simpler if only one alloc block can be used, instead<br>
of three also realloc does not clear the expanded buffer so if you have<br>
realloced and hit EOF you will end up with uninitialized data in the last byte<br>
since it puts the \0 after where it thinks the delim is, also the 3rd realloc could<br>
allow the \0 to write after the end of the buffer if *np == i<br>
I can also descope two vars and eliminate one local which is nice.<br></blockquote><div><br></div><div>Do you have your changes to hand?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
For testing I ran it with the ifdef __APPLE__/__ANDROID__ commented<br>
out.<br>
Do you have better test cases?<br></blockquote><div><br></div><div>I just ran grep * on a directory with subdirectories and large files.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
</span>For cp.c/do_install It is not working like the coreutils version of install<br>
O joy, install does not respect umask in coreutils and always creates 755<br>
toybox does respect umask, but on failure may leave the freshly<br>
created directory behind. and while your version does not segfault it will<br>
not produce the target file if that optc 1: return is still present.<br></blockquote><div><br></div><div>I do get the directory created.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">at the moment I don't know how you would get so check is not set on a non<br>
first arg processing in exec ok execdir okdir?<br>
it looks sort of like dlist_add*() is paired with llist_pop<br>
so we are advancing the argdata pointer and ss (by the length of argdata)<br>
what is this a fix for?<br>
<span class=""><br></span></blockquote><div><br></div><div>find -exec</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br></blockquote></div></div></div>