Skip to content

Commit

Permalink
Handle invalid case
Browse files Browse the repository at this point in the history
  • Loading branch information
malaterre committed Sep 13, 2022
1 parent 4213e02 commit 48d3441
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/MediaStorageAndFileFormat/gdcmCleaner.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,11 @@ static bool CleanCSA(DataSet &ds, const DataElement &de) {
if (bv->GetLength() >= 10 && memcmp(bv->GetPointer(), pds_com, 10) == 0) {
return true;
}
static const char psd_ocm[] = "p<sd<>oc>m";
// byte-swap PET_REPLAY_PARAM case:
if (bv->GetLength() >= 10 && memcmp(bv->GetPointer(), psd_ocm, 10) == 0) {
return true;
}
static const char end[] = "END! ";
if (bv->GetLength() >= 10 &&
memcmp(bv->GetPointer() + bv->GetLength() - 10, end, 10) == 0) {
Expand Down

0 comments on commit 48d3441

Please sign in to comment.