Skip to content

Commit

Permalink
Fix CID 1164567 (Dereference after null check)
Browse files Browse the repository at this point in the history
It looks like the check cblob_ptr != nullptr is not needed.
If cblob_ptr were NULL, we would have seen crashes in compute_bounding_box.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Aug 22, 2018
1 parent f3c7a17 commit 7910a76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ccstruct/blobbox.cpp
Expand Up @@ -103,7 +103,7 @@ void BLOBNBOX::merge( //merge blobs
// Merge this with other, taking the outlines from other.
// Other is not deleted, but left for the caller to handle.
void BLOBNBOX::really_merge(BLOBNBOX* other) {
if (cblob_ptr != nullptr && other->cblob_ptr != nullptr) {
if (other->cblob_ptr != nullptr) {
C_OUTLINE_IT ol_it(cblob_ptr->out_list());
ol_it.add_list_after(other->cblob_ptr->out_list());
}
Expand Down

0 comments on commit 7910a76

Please sign in to comment.