Print this page
smatch clean rtld
@@ -235,16 +235,14 @@
dbg_class = dbg_desc->d_class;
dbg_desc->d_class = 0;
}
/*
- * Perform some basic sanity checks. If we didn't get a load map or
- * the relocation offset is invalid then its possible someone has walked
- * over the .got entries or jumped to plt0 out of the blue.
+ * Perform some basic sanity checks. If the relocation offset is
+ * invalid then its possible someone has walked over the .got entries.
*/
- if ((!lmp) && (pltndx <=
- (ulong_t)PLTRELSZ(lmp) / (ulong_t)RELENT(lmp))) {
+ if (pltndx > (ulong_t)PLTRELSZ(lmp) / (ulong_t)RELENT(lmp)) {
Conv_inv_buf_t inv_buf;
eprintf(lml, ERR_FATAL, MSG_INTL(MSG_REL_PLTREF),
conv_reloc_amd64_type(R_AMD64_JUMP_SLOT, 0, &inv_buf),
EC_NATPTR(lmp), EC_XWORD(pltndx), EC_NATPTR(from));