File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,8 @@ struct nhrp_cie_header *nhrp_cie_pull(struct zbuf *zb,
182182 if (!cie )
183183 return NULL ;
184184
185- if (cie -> nbma_address_len + cie -> nbma_subaddress_len > 0 ) {
185+ if (cie -> nbma_address_len + cie -> nbma_subaddress_len > 0 &&
186+ cie -> nbma_address_len + cie -> nbma_subaddress_len <= zbuf_used (zb )) {
186187 sockunion_set (nbma , afi2family (htons (hdr -> afnum )),
187188 zbuf_pulln (zb ,
188189 cie -> nbma_address_len
@@ -192,7 +193,7 @@ struct nhrp_cie_header *nhrp_cie_pull(struct zbuf *zb,
192193 sockunion_family (nbma ) = AF_UNSPEC ;
193194 }
194195
195- if (cie -> protocol_address_len ) {
196+ if (cie -> protocol_address_len && cie -> protocol_address_len <= zbuf_used ( zb ) ) {
196197 sockunion_set (proto , proto2family (htons (hdr -> protocol_type )),
197198 zbuf_pulln (zb , cie -> protocol_address_len ),
198199 cie -> protocol_address_len );
You can’t perform that action at this time.
0 commit comments