dcmjs 0.29.1 → 0.29.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/dcmjs.es.js CHANGED
@@ -10301,9 +10301,13 @@ var DicomMessage = /*#__PURE__*/function () {
10301
10301
  throw new Error("Invalid DICOM file, expected header is missing");
10302
10302
  }
10303
10303
 
10304
- var el = DicomMessage._readTag(stream, useSyntax),
10305
- metaLength = el.values[0]; //read header buffer
10304
+ var el = DicomMessage._readTag(stream, useSyntax);
10306
10305
 
10306
+ if (el.tag.toCleanString() !== "00020000") {
10307
+ throw new Error("Invalid DICOM file, meta length tag is malformed or not present.");
10308
+ }
10309
+
10310
+ var metaLength = el.values[0]; //read header buffer
10307
10311
 
10308
10312
  var metaStream = stream.more(metaLength);
10309
10313