[PATCH] ar: read_num(): fix reading fields using the entire width

Denys Vlasenko vda.linux at googlemail.com
Tue Sep 10 14:28:12 UTC 2013


On Tue, Sep 10, 2013 at 11:52 AM, Peter Korsgaard <jacmet at sunsite.dk> wrote:
> ar fields are fixed length text strings (padded with spaces). Ensure
> bb_strtou doesn't read past the field in case the full width is used.
>
> The fields are only read once, so the simplest/smallest solution to me
> seems to be to just pass the length to read_num() and then zero terminate
> the string before passing it to bb_strtou. This does mean that the fields
> MUST be read in reverse order, so some minor reshuffling was needed.

Applied, thanks!


More information about the busybox mailing list