On Thu, Aug 31, 2023 at 3:57 AM Rob Landley <r...@landley.net> wrote: > +unsigned long long atollu(char *str) > +{ > + char *end = str; > + unsigned long long llu = strtoul(str, &end, 0);
Sorry I didn't notice this earlier, but hort...@google.com pointed out that we should be using strtoull() here. This supposedly isn't an issue on 64bit systems since toybox already assumes unsigned long and unsigned long long to both be exactly 64 bits, but could be problematic for a 32bit system where the two types have different sizes (although I haven't fully thought through the implications). On second look, shouldn't we also be checking errno? _______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net