File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -940,8 +940,10 @@ bool dcm_parse_pixeldata_offsets(DcmError **error,
940940 * first_frame_offset = position ;
941941
942942 // the next thing should be the tag for frame 1
943- if (!read_tag (& state , & tag , & position ) ||
944- tag != TAG_ITEM ) {
943+ if (!read_tag (& state , & tag , & position )) {
944+ return false;
945+ }
946+ if (tag != TAG_ITEM ) {
945947 dcm_error_set (error , DCM_ERROR_CODE_PARSE ,
946948 "Reading Basic Offset Table failed" ,
947949 "Basic Offset Table too large" );
@@ -990,8 +992,10 @@ bool dcm_parse_pixeldata_offsets(DcmError **error,
990992 }
991993
992994 // the next thing should be the end of sequence tag
993- if (!read_tag (& state , & tag , & position ) ||
994- tag != TAG_SQ_DELIM ) {
995+ if (!read_tag (& state , & tag , & position )) {
996+ return false;
997+ }
998+ if (tag != TAG_SQ_DELIM ) {
995999 dcm_error_set (error , DCM_ERROR_CODE_PARSE ,
9961000 "Reading Basic Offset Table failed" ,
9971001 "Too many frames in PixelData" );
You can’t perform that action at this time.
0 commit comments