In some places, there was one too many levels of sizeof() -
sizeof(sizeof(XXX)) is sizeof(size_t), but we wanted the size of type
XXX.
Reviewed-By: Guy Harris <[email protected]>
if (eigrp_tlv_len < sizeof(struct eigrp_tlv_header) ||
eigrp_tlv_len > tlen) {
if (eigrp_tlv_len < sizeof(struct eigrp_tlv_header) ||
eigrp_tlv_len > tlen) {
- print_unknown_data(tptr+sizeof(sizeof(struct eigrp_tlv_header)),"\n\t ",tlen);
+ print_unknown_data(tptr+sizeof(struct eigrp_tlv_header),"\n\t ",tlen);
}
/* do we want to see an additionally hexdump ? */
if (vflag > 1)
}
/* do we want to see an additionally hexdump ? */
if (vflag > 1)
- print_unknown_data(tptr+sizeof(sizeof(struct eigrp_tlv_header)),"\n\t ",
+ print_unknown_data(tptr+sizeof(struct eigrp_tlv_header),"\n\t ",
eigrp_tlv_len-sizeof(struct eigrp_tlv_header));
tptr+=eigrp_tlv_len;
eigrp_tlv_len-sizeof(struct eigrp_tlv_header));
tptr+=eigrp_tlv_len;
}
/* do we want to see an additionally hexdump ? */
if (vflag > 1 || hexdump==TRUE)
}
/* do we want to see an additionally hexdump ? */
if (vflag > 1 || hexdump==TRUE)
- print_unknown_data(tptr+sizeof(sizeof(struct ldp_msg_header)),"\n\t ",
+ print_unknown_data(tptr+sizeof(struct ldp_msg_header),"\n\t ",
msg_len);
tptr += msg_len+4;
msg_len);
tptr += msg_len+4;
}
/* do we want to see an additionally hexdump ? */
if (vflag > 1 || hexdump==TRUE)
}
/* do we want to see an additionally hexdump ? */
if (vflag > 1 || hexdump==TRUE)
- print_unknown_data(tptr+sizeof(sizeof(struct lmp_object_header)),"\n\t ",
+ print_unknown_data(tptr+sizeof(struct lmp_object_header),"\n\t ",
lmp_obj_len-sizeof(struct lmp_object_header));
tptr+=lmp_obj_len;
lmp_obj_len-sizeof(struct lmp_object_header));
tptr+=lmp_obj_len;
}
/* do we want to see an additionally tlv hexdump ? */
if (vflag > 1 || tlv_hexdump==TRUE)
}
/* do we want to see an additionally tlv hexdump ? */
if (vflag > 1 || tlv_hexdump==TRUE)
- print_unknown_data(tptr+sizeof(sizeof(struct lspping_tlv_header)),"\n\t ",
+ print_unknown_data(tptr+sizeof(struct lspping_tlv_header),"\n\t ",
}
/* do we also want to see a hex dump ? */
if (vflag > 1 || hexdump==TRUE)
}
/* do we also want to see a hex dump ? */
if (vflag > 1 || hexdump==TRUE)
- print_unknown_data(tptr+sizeof(sizeof(struct rsvp_object_header)),"\n\t ", /* FIXME indentation */
+ print_unknown_data(tptr+sizeof(struct rsvp_object_header),"\n\t ", /* FIXME indentation */
rsvp_obj_len-sizeof(struct rsvp_object_header));
tptr+=rsvp_obj_len;
rsvp_obj_len-sizeof(struct rsvp_object_header));
tptr+=rsvp_obj_len;
tlv_header->type != LACP_TLV_TERMINATOR &&
tlv_header->type != MARKER_TLV_TERMINATOR) {
printf("\n\t-----trailing data-----");
tlv_header->type != LACP_TLV_TERMINATOR &&
tlv_header->type != MARKER_TLV_TERMINATOR) {
printf("\n\t-----trailing data-----");
- print_unknown_data(tptr+sizeof(sizeof(struct tlv_header_t)),"\n\t ",tlen);
+ print_unknown_data(tptr+sizeof(struct tlv_header_t),"\n\t ",tlen);
}
/* do we want to see an additional hexdump ? */
if (vflag > 1) {
}
/* do we want to see an additional hexdump ? */
if (vflag > 1) {
- print_unknown_data(tptr+sizeof(sizeof(struct tlv_header_t)),"\n\t ",
+ print_unknown_data(tptr+sizeof(struct tlv_header_t),"\n\t ",
tlv_len-sizeof(struct tlv_header_t));
}
tlv_len-sizeof(struct tlv_header_t));
}