mirror of
https://github.com/ericonr/util-linux.git
synced 2024-04-21 09:12:35 -05:00
lscpu: check errno after strto..()
Addresses: https://github.com/karelzak/util-linux/issues/1356 Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
8335261c3d
commit
096487c616
@ -166,7 +166,10 @@ static int address_from_efi(size_t *address)
|
|||||||
continue;
|
continue;
|
||||||
*(addrp++) = '\0';
|
*(addrp++) = '\0';
|
||||||
if (strcmp(linebuf, "SMBIOS") == 0) {
|
if (strcmp(linebuf, "SMBIOS") == 0) {
|
||||||
|
errno = 0;
|
||||||
*address = strtoul(addrp, NULL, 0);
|
*address = strtoul(addrp, NULL, 0);
|
||||||
|
if (errno)
|
||||||
|
continue;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user