]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: Account for glibc-hwcaps/ prefix in _dl_important_hwcaps
authorFlorian Weimer <fweimer@redhat.com>
Wed, 23 Dec 2020 11:07:20 +0000 (12:07 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 23 Dec 2020 14:47:22 +0000 (15:47 +0100)
elf/dl-hwcaps.c

index 000e3c0eb91f3fab568e3d6621390b174e756e4f..6c394714d86a879cafa8d2c47298370267cc4f03 100644 (file)
@@ -192,6 +192,7 @@ _dl_important_hwcaps (const char *glibc_hwcaps_prepend,
 
   /* Each hwcaps subdirectory has a GLIBC_HWCAPS_PREFIX string prefix
      and a "/" suffix once stored in the result.  */
+  hwcaps_counts.maximum_length += strlen (GLIBC_HWCAPS_PREFIX) + 1;
   size_t total = (hwcaps_counts.count * (strlen (GLIBC_HWCAPS_PREFIX) + 1)
                  + hwcaps_counts.total_length);