diff options
| author | rgirada <rgirada@vmware.com> | 2021-10-21 06:39:49 -0700 | 
|---|---|---|
| committer | rgirada <rgirada@vmware.com> | 2021-10-29 11:04:06 -0700 | 
| commit | 6d1a5a1c542d9af9ce4f39f2998f1ec685824a83 (patch) | |
| tree | 0ac7aa0b1ee9419090491d5491b00af4c51267ca /ospf6d/ospf6_gr.h | |
| parent | 3c8161eaa88f6ae181637b8ad7d3a39399470cee (diff) | |
ospf6d: Addressing few coverity issues.
Description:
	Addressed the following TAINTED_SCALAR issue which can possibly
	leads to memory currption.
	1. *** CID 1506514:  Insecure data handling  (TAINTED_SddddddCALAR)
	   /ospf6d/ospf6_gr_helper.c: 1222 in ospf6_grace_lsa_show_info()
	2. *** CID 1506513:  Insecure data handling  (TAINTED_SCALAR)
	   /ospf6d/ospf6_gr_helper.c: 160 in ospf6_extract_grace_lsa_fields()
Signed-off-by: Rajesh Girada <rgirada@vmware.com>
Diffstat (limited to 'ospf6d/ospf6_gr.h')
| -rw-r--r-- | ospf6d/ospf6_gr.h | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/ospf6d/ospf6_gr.h b/ospf6d/ospf6_gr.h index 6406e8efee..28798d8717 100644 --- a/ospf6d/ospf6_gr.h +++ b/ospf6d/ospf6_gr.h @@ -93,7 +93,7 @@ struct tlv_header {  #define TLV_BODY_SIZE(tlvh) (ROUNDUP(ntohs((tlvh)->length), sizeof(uint32_t))) -#define TLV_SIZE(tlvh) (TLV_HDR_SIZE + TLV_BODY_SIZE(tlvh)) +#define TLV_SIZE(tlvh) (uint32_t)(TLV_HDR_SIZE + TLV_BODY_SIZE(tlvh))  #define TLV_HDR_TOP(lsah)                                                      \  	(struct tlv_header *)((char *)(lsah) + OSPF6_LSA_HEADER_SIZE)  | 
