Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136744
b: refs/heads/master
c: 56fc82c
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Ingo Molnar committed Feb 5, 2009
1 parent 0ba298d commit 2aff085
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 130ace11a9dc682541336d1fe5cb3bc7771a149e
refs/heads/master: 56fc82c5360cdf0b250b5eb74f38657b0402faa5
5 changes: 4 additions & 1 deletion trunk/scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,9 @@ static int parse_elf(struct elf_info *info, const char *filename)
const char *secstrings
= (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
const char *secname;
int nobits = sechdrs[i].sh_type == SHT_NOBITS;

if (sechdrs[i].sh_offset > info->size) {
if (!nobits && sechdrs[i].sh_offset > info->size) {
fatal("%s is truncated. sechdrs[i].sh_offset=%lu > "
"sizeof(*hrd)=%zu\n", filename,
(unsigned long)sechdrs[i].sh_offset,
Expand All @@ -425,6 +426,8 @@ static int parse_elf(struct elf_info *info, const char *filename)
}
secname = secstrings + sechdrs[i].sh_name;
if (strcmp(secname, ".modinfo") == 0) {
if (nobits)
fatal("%s has NOBITS .modinfo\n", filename);
info->modinfo = (void *)hdr + sechdrs[i].sh_offset;
info->modinfo_len = sechdrs[i].sh_size;
} else if (strcmp(secname, "__ksymtab") == 0)
Expand Down

0 comments on commit 2aff085

Please sign in to comment.