File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -311,6 +311,20 @@ TEST_CASE("deserializeMsgPack() filter") {
311
311
CHECK (doc.as <std::string>() == " {\" include\" :42}" );
312
312
CHECK (doc.memoryUsage () == JSON_OBJECT_SIZE (1 ) + 8 );
313
313
}
314
+
315
+ SECTION (" skip map 32" ) {
316
+ error = deserializeMsgPack (doc,
317
+ " \x82\xA6 ignore"
318
+ " \xDF\x00\x00\x00\x02 "
319
+ " \xA4 zero\xCA\x00\x00\x00\x00 "
320
+ " \xA2 pi\xCA\x40\x48\xF5\xC3 "
321
+ " \xA7 include\x2A " ,
322
+ filterOpt);
323
+
324
+ CHECK (error == DeserializationError::Ok);
325
+ CHECK (doc.as <std::string>() == " {\" include\" :42}" );
326
+ CHECK (doc.memoryUsage () == JSON_OBJECT_SIZE (1 ) + 8 );
327
+ }
314
328
}
315
329
316
330
SECTION (" filter = true" ) {
Original file line number Diff line number Diff line change @@ -204,6 +204,9 @@ class MsgPackDeserializer {
204
204
205
205
case 0xde : // map 16
206
206
return skipObject<uint16_t >(nestingLimit);
207
+
208
+ case 0xdf : // map 32
209
+ return skipObject<uint32_t >(nestingLimit);
207
210
}
208
211
209
212
return true ;
You can’t perform that action at this time.
0 commit comments