[BusyBox] dietlibc patch for pre5
Hannes Reinecke
hare at suse.de
Mon Feb 2 00:55:34 MST 2004
Vladimir N. Oleynik wrote:
> Hannes,
>
>> btw, I've also fixed an 'interesting' use of strchrnul:
>>
>> (*vp->func)(strchrnul(s, '=') + 1);
>>
>> I.e. if 's' does not contain the character '=', the argument to the
>> function will be a pointer to 's + strlen(s) + 1'. Uh-oh.
>
>
> Yes. But ash don`t have error.
> vartable have two format: "VAR=" or "VAR\0".
> Last string (undefault variable) have double zero.
> And 's + strlen(s) + 1' pointer setted to last zero.
>
Which is a tad non-obvious. What about putting a comment above those
lines which makes it clear for the unsuspecting users?
Otherwise I'd imagine that also others might be inclined to send
patches, because the above is exactly what you're looking for if you're
bugfixing programs.
Cheers,
Hannes
--
Dr. Hannes Reinecke hare at suse.de
SuSE Linux AG S390 & zSeries
Maxfeldstraße 5 +49 911 74053 688
90409 Nürnberg http://www.suse.de
More information about the busybox
mailing list