Browse code

bb11553 - allowing sigtool to ignore comments in signature files

Mickey Sola authored on 2016/04/18 23:28:32
Showing 1 changed files
... ...
@@ -1406,6 +1406,10 @@ static int listdb(const char *filename, const regex_t *regex)
1406 1406
 		continue;
1407 1407
 	    }
1408 1408
 	    line++;
1409
+
1410
+            if(buffer && buffer[0] == '#')
1411
+                continue;
1412
+
1409 1413
 	    pt = strchr(buffer, '=');
1410 1414
 	    if(!pt) {
1411 1415
 		mprintf("!listdb: Malformed pattern line %u (file %s)\n", line, filename);
... ...
@@ -1449,7 +1453,11 @@ static int listdb(const char *filename, const regex_t *regex)
1449 1449
 		continue;
1450 1450
 	    }
1451 1451
 	    line++;
1452
-	    start = cli_strtok(buffer, 2, ":");
1452
+
1453
+            if(buffer && buffer[0] == '#')
1454
+                continue;
1455
+
1456
+            start = cli_strtok(buffer, 2, ":");
1453 1457
 
1454 1458
 	    if(!start) {
1455 1459
 		mprintf("!listdb: Malformed pattern line %u (file %s)\n", line, filename);
... ...
@@ -1476,6 +1484,9 @@ static int listdb(const char *filename, const regex_t *regex)
1476 1476
 	    }
1477 1477
 	    line++;
1478 1478
 
1479
+            if(buffer && buffer[0] == '#')
1480
+                continue;
1481
+
1479 1482
 	    if(cli_strbcasestr(filename, ".ldb") || cli_strbcasestr(filename, ".ldu"))
1480 1483
 		pt = strchr(buffer, ';');
1481 1484
 	    else