summaryrefslogtreecommitdiffstats
path: root/contrib/file/src/elfclass.h
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2014-12-11 19:27:27 +0000
committerdim <dim@FreeBSD.org>2014-12-11 19:27:27 +0000
commitda65ea02a341dd797c46b6987753bc1453982b36 (patch)
treed9a72217c1d2c4dcfef27a2fd2078dd4b3f69a64 /contrib/file/src/elfclass.h
parent4cba228708753c1128b75a2c25c0dda582a9913a (diff)
parentdc1c036751105b0a801375ba642278a13543bf7c (diff)
downloadFreeBSD-src-da65ea02a341dd797c46b6987753bc1453982b36.zip
FreeBSD-src-da65ea02a341dd797c46b6987753bc1453982b36.tar.gz
Merge ^/head r275685 through r275714.
Diffstat (limited to 'contrib/file/src/elfclass.h')
-rw-r--r--contrib/file/src/elfclass.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/file/src/elfclass.h b/contrib/file/src/elfclass.h
index 0826ce3..e144d11 100644
--- a/contrib/file/src/elfclass.h
+++ b/contrib/file/src/elfclass.h
@@ -36,7 +36,7 @@
#ifdef ELFCORE
case ET_CORE:
phnum = elf_getu16(swap, elfhdr.e_phnum);
- if (phnum > MAX_PHNUM)
+ if (phnum > ms->elf_phnum_max)
return toomany(ms, "program", phnum);
flags |= FLAGS_IS_CORE;
if (dophn_core(ms, clazz, swap, fd,
@@ -49,10 +49,10 @@
case ET_EXEC:
case ET_DYN:
phnum = elf_getu16(swap, elfhdr.e_phnum);
- if (phnum > MAX_PHNUM)
+ if (phnum > ms->elf_phnum_max)
return toomany(ms, "program", phnum);
shnum = elf_getu16(swap, elfhdr.e_shnum);
- if (shnum > MAX_SHNUM)
+ if (shnum > ms->elf_shnum_max)
return toomany(ms, "section", shnum);
if (dophn_exec(ms, clazz, swap, fd,
(off_t)elf_getu(swap, elfhdr.e_phoff), phnum,
@@ -62,7 +62,7 @@
/*FALLTHROUGH*/
case ET_REL:
shnum = elf_getu16(swap, elfhdr.e_shnum);
- if (shnum > MAX_SHNUM)
+ if (shnum > ms->elf_shnum_max)
return toomany(ms, "section", shnum);
if (doshn(ms, clazz, swap, fd,
(off_t)elf_getu(swap, elfhdr.e_shoff), shnum,
OpenPOWER on IntegriCloud