diff options
author | Chris Johns <chrisj@rtems.org> | 2014-11-20 13:52:12 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2014-11-20 13:52:12 +1100 |
commit | 580466cc9c7244d37352523009fda65108a666fd (patch) | |
tree | bcd4013f192cba27ba83dd36052148156cbb7de4 /cpukit/libdl/rtl-elf.c | |
parent | libdl: Update the comments. (diff) | |
download | rtems-580466cc9c7244d37352523009fda65108a666fd.tar.bz2 |
libdl: Update comment with details about the error fix.
See refs #2192.
Diffstat (limited to 'cpukit/libdl/rtl-elf.c')
-rw-r--r-- | cpukit/libdl/rtl-elf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cpukit/libdl/rtl-elf.c b/cpukit/libdl/rtl-elf.c index 3a432aa2ea..35201d5ded 100644 --- a/cpukit/libdl/rtl-elf.c +++ b/cpukit/libdl/rtl-elf.c @@ -639,6 +639,9 @@ rtems_rtl_elf_parse_sections (rtems_rtl_obj_t* obj, int fd, Elf_Ehdr* ehdr) { uint32_t flags; + /* + * Make sure section is at least 32bits to avoid 16-bit overflow errors. + */ off = obj->ooffset + ehdr->e_shoff + (((uint32_t) section) * ehdr->e_shentsize); if (!rtems_rtl_obj_cache_read_byval (sects, fd, off, &shdr, sizeof (shdr))) |