Changeset 76cb4bc in subsurface


Ignore:
Timestamp:
Dec 26, 2017, 4:06:05 PM (4 weeks ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
260ff50
Parents:
04bca45
git-author:
Dirk Hohndel <dirk@…> (12/26/17 15:49:19)
git-committer:
Dirk Hohndel <dirk@…> (12/26/17 16:06:05)
Message:

Cleanup: avoid out of bounds access

sizeof() is clearly the wrong way to get to the size of that array...

Coverity CID 208294

Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/uemis-downloader.c

    r2f84a85 r76cb4bc  
    883883                        fprintf(debugfile, "Expect to find section %s\n", sections[nr_sections]);
    884884#endif
    885                         if (nr_sections < sizeof(sections) - 1)
     885                        if (nr_sections < sizeof(sections) / sizeof(*sections) - 1)
    886886                                nr_sections++;
    887887                        continue;
Note: See TracChangeset for help on using the changeset viewer.