version 1.25, 2015/01/19 20:25:36 |
version 1.26, 2015/02/06 23:21:59 |
|
|
#include <elf_abi.h> |
#include <elf_abi.h> |
#include <errno.h> |
#include <errno.h> |
#include <err.h> |
#include <err.h> |
|
#include <stdint.h> |
#include <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
#include <limits.h> |
|
#include <ctype.h> |
#include <ctype.h> |
#include "elfuncs.h" |
#include "elfuncs.h" |
#include "util.h" |
#include "util.h" |
|
|
for (i = 0; i < eh->e_shnum; i++) { |
for (i = 0; i < eh->e_shnum; i++) { |
if (!strcmp(shstr + shdr[i].sh_name, strtab)) { |
if (!strcmp(shstr + shdr[i].sh_name, strtab)) { |
*pstabsize = shdr[i].sh_size; |
*pstabsize = shdr[i].sh_size; |
if (*pstabsize > SIZE_T_MAX) { |
if (*pstabsize > SIZE_MAX) { |
warnx("%s: corrupt file", name); |
warnx("%s: corrupt file", name); |
return (1); |
return (1); |
} |
} |