]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
nss: Fix tst-nss-hash UB
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 23 Apr 2025 19:42:28 +0000 (16:42 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 8 May 2025 12:25:44 +0000 (09:25 -0300)
UBSAN: Undefined behaviour in tst-nss-hash.c:49:8 variable length array bound evaluates to non-positive value 0

nss/tst-nss-hash.c

index eb1ed3e3955c70871b2cc46c7717ce3fcccaf8ef..98113762e0a102ca17ed88324aae11dbb71fac07 100644 (file)
@@ -62,7 +62,7 @@ static int
 do_test (void)
 {
   size_t i, j;
-  for (i = 0; i < 100; ++i)
+  for (i = 1; i < 100; ++i)
     {
       for (j = 0; j < 8192; ++j)
        {