]> git.puffer.fish Git - mirror/frr.git/commitdiff
Quagga crash in prefix_list_apply
authorDaniel Walton <dwalton@cumulusnetworks.com>
Fri, 6 Nov 2015 16:36:37 +0000 (16:36 +0000)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Fri, 6 Nov 2015 16:36:37 +0000 (16:36 +0000)
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-8130

lib/plist.c

index 63fd94c42205733f9018d933105071204192feff..c974a75b9079aa2ffccac403aa95ae509dbff104 100644 (file)
@@ -743,7 +743,7 @@ prefix_list_apply (struct prefix_list *plist, void *object)
 
   struct prefix *p = (struct prefix *) object;
   uint8_t *byte = &p->u.prefix;
-  size_t depth = plist->master->trie_depth;
+  size_t depth;
   size_t validbits = p->prefixlen;
   struct pltrie_table *table;
 
@@ -753,6 +753,7 @@ prefix_list_apply (struct prefix_list *plist, void *object)
   if (plist->count == 0)
     return PREFIX_PERMIT;
 
+  depth = plist->master->trie_depth;
   table = plist->trie;
   while (1)
     {