Project

General

Profile

Bug #1187 » fix-dcmpschk-crash.patch

Patch that fixes the issue - Marco Eichelberg, 2026-01-12 16:15

View differences:

dcmpstat/apps/dcmpschk.cc
if (isaStringVR(vr)) {
/* only strings have variable length components */
char* value = NULL;
((DcmByteString*)elem)->getString(value);
if (EC_Normal == ((DcmByteString*)elem)->getString(value))
{
char **fields = new char*[vm+1];
if (fields == NULL) {
......
}
delete[] fields;
}
}
} else {
Uint32 componentSize = len; /* vm is 0 if value field is too short, e.g. < 8 bytes for FD */
if (vm>0) componentSize = len/vm;
(3-3/3)