Skip to content

Commit

Permalink
Fixed possible NULL pointer dereference.
Browse files Browse the repository at this point in the history
Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and patch.
  • Loading branch information
michaelonken committed Sep 15, 2021
1 parent 79ddbd2 commit 5c14bf5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dcmnet/libsrc/diutil.cc
Expand Up @@ -171,7 +171,8 @@ DU_getStringDOElement(DcmItem *obj, DcmTagKey t, char *s, size_t bufsize)
s[0] = '\0';
} else {
ec = elem->getString(aString);
OFStandard::strlcpy(s, aString, bufsize);
if (ec == EC_Normal)
OFStandard::strlcpy(s, aString, bufsize);
}
}
return (ec == EC_Normal);
Expand Down

0 comments on commit 5c14bf5

Please sign in to comment.