mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 08:01:08 +00:00
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>
This commit is contained in:
parent
9eed48c8be
commit
bc3c89b130
1 changed files with 4 additions and 1 deletions
|
@ -290,7 +290,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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue