We disallow using any compound type as a described descriptor to avoid recursion in decoding. Although these seem syntactically valid they don't seem to be of any conceivable use!
| 478 | // in decoding. Although these seem syntactically valid they don't seem to be of any |
| 479 | // conceivable use! |
| 480 | static inline bool pni_allowed_descriptor_code(uint8_t code) |
| 481 | { |
| 482 | return |
| 483 | code != PNE_DESCRIPTOR && |
| 484 | code != PNE_ARRAY8 && code != PNE_ARRAY32 && |
| 485 | code != PNE_LIST8 && code != PNE_LIST32 && |
| 486 | code != PNE_MAP8 && code != PNE_MAP32; |
| 487 | } |
| 488 | |
| 489 | int pni_decoder_single_described(pn_decoder_t *decoder, pn_data_t *data) |
| 490 | { |
no outgoing calls
no test coverage detected