Changeset fc523ac8 in rtems


Ignore:
Timestamp:
Nov 19, 2014, 11:18:16 PM (5 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.11, master
Children:
2ae58c69
Parents:
4f1bbbfc
Message:

libdl: Fix possible 16-bit overflow (Coverity 1255339) refs #2192.

On a 16-bit target the section value could result in a sign-extension
overflow.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libdl/rtl-elf.c

    r4f1bbbfc rfc523ac8  
    640640    uint32_t flags;
    641641
    642     off = obj->ooffset + ehdr->e_shoff + (section * ehdr->e_shentsize);
     642    off = obj->ooffset + ehdr->e_shoff + (((uint32_t) section) * ehdr->e_shentsize);
    643643
    644644    if (!rtems_rtl_obj_cache_read_byval (sects, fd, off, &shdr, sizeof (shdr)))
Note: See TracChangeset for help on using the changeset viewer.