From 3c354d62f5c30d32bd553735473e95a8af4f56ec Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 18 Jul 2024 09:15:44 -0300 Subject: [PATCH] elf: Parse the auxv values as unsigned on tst-tunables-enable_secure-env.c (BZ 31890) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- elf/tst-tunables-enable_secure-env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;