diff options
author | Peng Fan <Peng.Fan@freescale.com> | 2015-11-24 16:54:20 +0800 |
---|---|---|
committer | guoyin.chen <guoyin.chen@freescale.com> | 2016-03-04 15:35:52 +0800 |
commit | 79757d63a38c11751c9ff773915a28f5d2641349 (patch) | |
tree | 67ccacd3e441fb7644afb32f791d8683d7e68f6f /arch/arm | |
parent | f7a233fbbd4d6b794d85949f1d85f24677afba83 (diff) | |
download | u-boot-imx-79757d63a38c11751c9ff773915a28f5d2641349.zip u-boot-imx-79757d63a38c11751c9ff773915a28f5d2641349.tar.gz u-boot-imx-79757d63a38c11751c9ff773915a28f5d2641349.tar.bz2 |
common: bootm: check return value of strict_strtoul
Before continue, check return value of strict_strtoul.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Simon Glass <sjg@chromium.org>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit bc3c89b1308281edceb67051a44026545dc7b505)
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/lib/bootm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 2d6b676..ac24f6b 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -289,7 +289,10 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) s = getenv("machid"); if (s) { - strict_strtoul(s, 16, &machid); + if (strict_strtoul(s, 16, &machid) < 0) { + debug("strict_strtoul failed!\n"); + return; + } printf("Using machid 0x%lx from environment\n", machid); } |