Changeset fe882ea5 in subsurface


Ignore:
Timestamp:
Dec 11, 2013, 7:29:58 AM (4 years ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
Mtest, android_test, dcDownload, foratdotde, gitMerge, gitdebug, gitpictures, ios, master, mergeKirigamiPort, pictimeshift, resolutionIndependence, spinner, testTomaz, testing, v4.0-branch, v4.0.3-branch, v4.2-branch, v4.4-branch, v4.5-branch
Children:
819bd10
Parents:
fbcad20
git-author:
Lubomir I. Ivanov <neolit123@…> (12/11/13 05:26:49)
git-committer:
Dirk Hohndel <dirk@…> (12/11/13 07:29:58)
Message:

uiemis-downloader.c: fix preceding limit check

next_segment():
The iterator limit check (i < size - 1) should precede
the indexing (buf[i]).

Reported by the program cppcheck.

Signed-off-by: Lubomir I. Ivanov <neolit123@…>
Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uemis-downloader.c

    ref3a51f rfe882ea5  
    267267        while (!done) {
    268268                if (i < size) {
    269                         if (buf[i] == '\\' && i < size - 1 &&
     269                        if (i < size - 1 && buf[i] == '\\' &&
    270270                                (buf[i+1] == '\\' || buf[i+1] == '{'))
    271271                                memcpy(buf + i, buf + i + 1, size - i - 1);
Note: See TracChangeset for help on using the changeset viewer.