]> git.proxmox.com Git - mirror_frr.git/commit
bgpd: fix heap buffer overflow in lcom -> str enc
authorQuentin Young <qlyoung@cumulusnetworks.com>
Thu, 21 Nov 2019 23:55:59 +0000 (18:55 -0500)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 22 Nov 2019 08:26:31 +0000 (03:26 -0500)
commit73bfd76d65ec4ac0fb1b3f6a0566b702458dd48b
tree705d3edbbe33c3b5bddbcbff7b018a0d006efcdb
parent91085f974a29a43bf6ec6f2c1b13df281837bd88
bgpd: fix heap buffer overflow in lcom -> str enc

Spaces were not being accounted for in the heap buffer sizing, leading
to a heap buffer overflow when encoding large communities to their
string representations.

This patch also uses safer functions to do the encoding instead of
pointer math.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
bgpd/bgp_lcommunity.c