[rtems commit] libdl: Update comment with details about the error fix.
Chris Johns
chrisj at rtems.org
Thu Nov 20 02:53:09 UTC 2014
Module: rtems
Branch: master
Commit: 580466cc9c7244d37352523009fda65108a666fd
Changeset: http://git.rtems.org/rtems/commit/?id=580466cc9c7244d37352523009fda65108a666fd
Author: Chris Johns <chrisj at rtems.org>
Date: Thu Nov 20 13:52:12 2014 +1100
libdl: Update comment with details about the error fix.
See refs #2192.
---
cpukit/libdl/rtl-elf.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/cpukit/libdl/rtl-elf.c b/cpukit/libdl/rtl-elf.c
index 3a432aa..35201d5 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)))
More information about the vc
mailing list