Browse Source

Crash bug when excepting ALL addresses RouteGen_addException('0.0.0.0/0')

Caleb James DeLisle 8 months ago
parent
commit
6271719f48
1 changed files with 3 additions and 0 deletions
  1. 3 0
      tunnel/RouteGen.c

+ 3 - 0
tunnel/RouteGen.c

@@ -354,6 +354,9 @@ static void mergePrefixSets4(struct ArrayList_OfPrefix4* mergeInto,
                              struct ArrayList_OfPrefix4* prefixes)
 {
     struct Prefix4* highestPrefix = NULL;
+    if (prefixes->length == 0) {
+        return;
+    }
     for (int j = 0; j < prefixes->length; j++) {
         struct Prefix4* result = ArrayList_OfPrefix4_get(prefixes, j);
         Assert_true(result);