]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: fix crashes caused by missing input validation
authorRenato Westphal <renato@opensourcerouting.org>
Fri, 19 Oct 2018 18:54:47 +0000 (15:54 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Mon, 17 Dec 2018 14:14:05 +0000 (12:14 -0200)
The rfapi code wasn't checking if strtoul() succeeded or not when parsing
the list of labels. Fix the affected commands by not allowing the user
to enter a non-numeric input.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
bgpd/rfapi/bgp_rfapi_cfg.c

index b5879df70010556f7bc9f73257484db0838fc46f..7a3ba2d1a109fe2459b65a5f6cc277112cd51b42 100644 (file)
@@ -3475,7 +3475,7 @@ DEFUN (vnc_l2_group_lni,
 
 DEFUN (vnc_l2_group_labels,
        vnc_l2_group_labels_cmd,
-       "labels LABELLIST...",
+       "labels (0-1048575)...",
        "Specify label values associated with group\n"
        "Space separated list of label values <0-1048575>\n")
 {
@@ -3509,7 +3509,7 @@ DEFUN (vnc_l2_group_labels,
 
 DEFUN (vnc_l2_group_no_labels,
        vnc_l2_group_no_labels_cmd,
-       "no labels LABELLIST...",
+       "no labels (0-1048575)...",
        NO_STR
        "Specify label values associated with L2 group\n"
        "Space separated list of label values <0-1048575>\n")