File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -169,10 +169,13 @@ void decode(Byte[] raw, Int32 pOffset) {
169169 }
170170 void parseNestedType ( ) {
171171 // processing rules (assuming zero-based bits):
172- // if bit 5 is set to "1", or the type is SEQUENCE/SET -- the type is constructed. Unroll nested types.
173- // if bit 5 is set to "0", attempt to resolve nested types only for UNIVERSAL tags.
174- // some universal types cannot include nested types: skip them in advance.
175- if ( _excludedTags . Contains ( Tag ) || PayloadLength < 2 ) { return ; }
172+ // -- if bit 5 is set to "1", or the type is SEQUENCE/SET -- the type is constructed. Unroll nested types.
173+ // -- if bit 5 is set to "0", attempt to resolve nested types only for UNIVERSAL tags.
174+ // -- if the value is implicitly tagged, it cannot contain nested types.
175+ // -- some universal types cannot include nested types: skip them in advance.
176+ if ( _excludedTags . Contains ( Tag ) || PayloadLength < 2 || Tag > 127 & Tag < 160 ) {
177+ return ;
178+ }
176179 Int64 start = PayloadStartOffset ;
177180 Int32 length = PayloadLength ;
178181 // BIT_STRING includes "unused bits" octet, do not count it in calculations
You can’t perform that action at this time.
0 commit comments