Skip to content

Commit

Permalink
Fix CID 1164646 (Uninitialized pointer field)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Jul 1, 2018
1 parent b970fae commit 86eb4df
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/api/baseapi.cpp
Expand Up @@ -2617,7 +2617,11 @@ struct TESS_CHAR : ELIST_LINK {
strncpy(unicode_repr, repr, length);
}

TESS_CHAR() { // Satisfies ELISTIZE.
TESS_CHAR()
: unicode_repr(nullptr),
length(0),
cost(0.0f)
{ // Satisfies ELISTIZE.
}
~TESS_CHAR() {
delete [] unicode_repr;
Expand Down

0 comments on commit 86eb4df

Please sign in to comment.