]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib: two extra bytes were being allocated for the SG string
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Sat, 20 Apr 2019 14:34:03 +0000 (07:34 -0700)
committerAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Sun, 21 Apr 2019 14:24:20 +0000 (07:24 -0700)
Fixup in response to Jafar's review comments.

This is actually old code moved in from pimd to lib. But the fixup does
make sense.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
lib/prefix.h

index ffc973f6ea9041cdb4f3bb0b3b4dad4603df3c96..d3c387e102945e9df619485f6e0db9749e0d250a 100644 (file)
@@ -323,12 +323,12 @@ union prefixconstptr {
 
 /*
  * Longest possible length of a (S,G) string is 36 bytes
- * 123.123.123.123 = 16 * 2
+ * 123.123.123.123 = 15 * 2
  * (,) = 3
  * NULL Character at end = 1
  * (123.123.123.123,123.123.123.123)
  */
-#define PREFIX_SG_STR_LEN 36
+#define PREFIX_SG_STR_LEN 34
 
 /* Max bit/byte length of IPv4 address. */
 #define IPV4_MAX_BYTELEN    4