mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 15:47:22 +00:00
zebra: fix mpls_str2label()
When making improvements to error handling in this code I accidentally introduced an off-by-one. Fix it. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
c6200b5467
commit
a79d6ebb48
@ -1774,7 +1774,7 @@ mpls_str2label (const char *label_str, u_int8_t *num_labels,
|
|||||||
|
|
||||||
if (!rc)
|
if (!rc)
|
||||||
{
|
{
|
||||||
*num_labels = i + 1;
|
*num_labels = i;
|
||||||
memcpy (labels, pl, *num_labels * sizeof (mpls_label_t));
|
memcpy (labels, pl, *num_labels * sizeof (mpls_label_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user