From: Adhemerval Zanella Date: Thu, 18 Jul 2024 12:15:44 +0000 (-0300) Subject: elf: Parse the auxv values as unsigned on tst-tunables-enable_secure-env.c (BZ 31890) X-Git-Tag: glibc-2.40~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3c354d62f5c30d32bd553735473e95a8af4f56ec;p=thirdparty%2Fglibc.git elf: Parse the auxv values as unsigned on tst-tunables-enable_secure-env.c (BZ 31890) AT_HWCAP on some architecture can indeed use all bits. Checked on x86_64-linux-gnu and powerpc-linux-gnu. Reviewed-By: Andreas K. Hüttel --- diff --git a/elf/tst-tunables-enable_secure-env.c b/elf/tst-tunables-enable_secure-env.c index 01f121efc3..937259f218 100644 --- a/elf/tst-tunables-enable_secure-env.c +++ b/elf/tst-tunables-enable_secure-env.c @@ -46,7 +46,7 @@ check_auxv (unsigned long type, char *argv) { char *endptr; errno = 0; - unsigned long int varg = strtol (argv, &endptr, 10); + unsigned long int varg = strtoul (argv, &endptr, 10); TEST_VERIFY_EXIT (errno == 0); TEST_VERIFY_EXIT (*endptr == '\0'); errno = 0;