[U-Boot] [PATCH] lib: strto: fix incorrect handling of specified base

Simon Glass sjg at chromium.org
Tue Sep 12 12:27:45 UTC 2017


On 11 September 2017 at 14:53, Rob Clark <robdclark at gmail.com> wrote:
>
> The strto functions should honor the specified base (if non-zero) rather
> than permitting a hex or octal string when the user wanted (for example)
> base 10.
>
> This has been fixed somewhere along the way in the upstream linux kernel
> src tree, at some point after these was copied in to u-boot.  And also
> in a way that duplicates less code.  So port _parse_integer_fixup_radix()
> to u-boot.
>
> Signed-off-by: Rob Clark <robdclark at gmail.com>
> ---
>  lib/strto.c | 45 +++++++++++++++++++--------------------------
>  1 file changed, 19 insertions(+), 26 deletions(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list