Comment # 9
on bug 9983
from Peter Wu
This seems to be the problematic part of proto_tree_add_bytes_format
if (!(PTREE_DATA(tree)->visible)) { \
if (PTREE_FINFO(tree)) { \
if ((hfinfo->ref_type != HF_REF_TYPE_DIRECT) \
&& (hfinfo->type != FT_PROTOCOL || \
PTREE_DATA(tree)->fake_protocols)) { \
/* just return tree back to the caller */\
return tree; \
} \
} \
}
ref_type is HF_REF_TYPE_NONE, type is FT_BYTES (and fake_protocols 1). So
proto_tree_add_bytes_format will return without checking lengths or anything. I
am not familiar in this part, perhaps you have more ideas to fix this?
Should we add a tvb_ensure_bytes_exist(tvb, offset, payload_length) before
calling proto_tree_add_bytes_format? Similar for the padding?
Also, please comment on https://code.wireshark.org/review/#/c/1105/, should the
messages be the same?
You are receiving this mail because:
- You are watching all bug changes.