As of 4ee21124638949b35ba5a80ebfd4efd7c0161891, ndn_data_tlv_decode_no_verify invokes:
// meta info
ndn_metainfo_tlv_decode(&decoder, &data->metainfo);
// content
decoder_get_type(&decoder, &probe);
decoder_get_length(&decoder, &probe);
data->content_size = probe;
NDN Packet Format v0.3 specifies that Content element is optional in a Data packet. However, the above code does not properly consider this case.
For example, given input:
As of 4ee21124638949b35ba5a80ebfd4efd7c0161891,
ndn_data_tlv_decode_no_verify
invokes:NDN Packet Format v0.3 specifies that Content element is optional in a Data packet. However, the above code does not properly consider this case. For example, given input:
the decoding function would incorrectly read the SignatureInfo element as Content.