MCPcopy Create free account
hub / github.com/apache/qpid-proton / pni_allowed_descriptor_code

Function pni_allowed_descriptor_code

c/src/core/decoder.c:480–487  ·  view source on GitHub ↗

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!

Source from the content-addressed store, hash-verified

478// in decoding. Although these seem syntactically valid they don't seem to be of any
479// conceivable use!
480static 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
489int pni_decoder_single_described(pn_decoder_t *decoder, pn_data_t *data)
490{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected