aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2012-11-21 18:34:50 -0200
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2012-11-21 20:22:56 -0200
commitd196b8d99f0a46d5e96678daabe74fda94875886 (patch)
treeb2f66ca1ed3d558188a85d2a227f3c987cce2d10
parent02c64df3c2b33880b18d3f4aba9fa8e48e5ca904 (diff)
downloadkmod-d196b8d99f0a46d5e96678daabe74fda94875886.tar.gz
libkmod-module: Remove key+value vermagic from .modinfo section
When told to force load a module, we were removing only the value of vermagic instead of the complete entry. Philippe De Swert (philippe.deswert@jollamobile.com) sent a patch that was additionally mangling also the last two chars of the key ("vermagic="). Instead of creating an invalid entry in .modinfo section like this, this patch removes the complete entry, key + value, by zeroing the entire string. Much thanks to Philippe who found the issue and pointed to the fix.
-rw-r--r--libkmod/libkmod-elf.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/libkmod/libkmod-elf.c b/libkmod/libkmod-elf.c
index 38e83c1..dc5a83e 100644
--- a/libkmod/libkmod-elf.c
+++ b/libkmod/libkmod-elf.c
@@ -611,7 +611,6 @@ int kmod_elf_strip_vermagic(struct kmod_elf *elf)
i += strlen(s);
continue;
}
- s += len;
off = (const uint8_t *)s - elf->memory;
if (elf->changed == NULL) {