소스 검색

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

Caleb James DeLisle 9 달 전
부모
커밋
6271719f48
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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);