Skip to content

Commit

Permalink
Fix CID 1385633 (Dereference before null check)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Apr 26, 2018
1 parent af72ad7 commit e2135de
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ccutil/elst.cpp
Expand Up @@ -210,11 +210,13 @@ ELIST_LINK *ELIST_ITERATOR::forward() {
cycle_pt = next;
current = next;
}
#ifndef NDEBUG
if (!current)
NULL_DATA.error ("ELIST_ITERATOR::forward", ABORT, nullptr);
#endif
next = current->next;

#ifndef NDEBUG
if (!current)
NULL_DATA.error ("ELIST_ITERATOR::forward", ABORT, nullptr);
if (!next)
NULL_NEXT.error ("ELIST_ITERATOR::forward", ABORT,
"This is: %p Current is: %p", this, current);
Expand Down

0 comments on commit e2135de

Please sign in to comment.