diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-07-05 12:56:52 -0400 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-07-05 12:56:52 -0400 |
| commit | a79d6ebb485f5bb81d576e6d88bf2b00f524d264 (patch) | |
| tree | 45535a368be1ef8e24273b2c2c946f1a8408dd44 /zebra/zebra_mpls.c | |
| parent | c6200b54679f7e65d4a1036cece3d6cb08ccb9c5 (diff) | |
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>
Diffstat (limited to 'zebra/zebra_mpls.c')
| -rw-r--r-- | zebra/zebra_mpls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index e08ff08cf6..93844ee2a6 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -1774,7 +1774,7 @@ mpls_str2label (const char *label_str, u_int8_t *num_labels, if (!rc) { - *num_labels = i + 1; + *num_labels = i; memcpy (labels, pl, *num_labels * sizeof (mpls_label_t)); } |
