From a3b2cde58d1c50a5a845ef9e78c24e91f9d7c0d3 Mon Sep 17 00:00:00 2001 From: John Reiser Date: Fri, 17 Apr 2020 17:09:47 -0700 Subject: [PATCH] max_bucket versus symbias modified: p_lx_elf.cpp --- src/p_lx_elf.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp index 73e2c68b..fb3506bc 100644 --- a/src/p_lx_elf.cpp +++ b/src/p_lx_elf.cpp @@ -1697,9 +1697,9 @@ PackLinuxElf32::invert_pt_dynamic(Elf32_Dyn const *dynp) } } } - if (bmax < symbias) { + if ((1+ bmax) < symbias) { char msg[80]; snprintf(msg, sizeof(msg), - "bad DT_GNU_HASH max_bucket=%#x < symbias=%#x", bmax, symbias); + "bad DT_GNU_HASH (1+ max_bucket)=%#x < symbias=%#x", 1+ bmax, symbias); throwCantPack(msg); } bmax -= symbias; @@ -5248,9 +5248,9 @@ PackLinuxElf64::invert_pt_dynamic(Elf64_Dyn const *dynp) } } } - if (bmax < symbias) { + if ((1+ bmax) < symbias) { char msg[80]; snprintf(msg, sizeof(msg), - "bad DT_GNU_HASH max_bucket=%#x < symbias=%#x", bmax, symbias); + "bad DT_GNU_HASH (1+ max_bucket)=%#x < symbias=%#x", 1+ bmax, symbias); throwCantPack(msg); } bmax -= symbias;