bgpd: remove extra ecom attr ptr increment

Copy paste leads to invalid read of 1 byte off the heap when converting
extended community attributes into strings.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2019-11-21 19:00:11 -05:00
parent 2d7ef3bba7
commit 21c64e0895

View File

@ -822,7 +822,6 @@ char *ecommunity_ecom2str(struct ecommunity *ecom, int format, int filter)
== ECOMMUNITY_EVPN_SUBTYPE_ES_IMPORT_RT) { == ECOMMUNITY_EVPN_SUBTYPE_ES_IMPORT_RT) {
struct ethaddr mac; struct ethaddr mac;
pnt++;
memcpy(&mac, pnt, ETH_ALEN); memcpy(&mac, pnt, ETH_ALEN);
len = sprintf( len = sprintf(
str_buf + str_pnt, str_buf + str_pnt,