diff --git a/src/cfgfile.c b/src/cfgfile.c index 591595f6..3fc7d2bf 100644 --- a/src/cfgfile.c +++ b/src/cfgfile.c @@ -2363,21 +2363,28 @@ static void _parse_cors(xmlDocPtr doc, static void _cors_sort_origins_by_length_desc(char **origins) { - int length; + uint length; char *temp; + // If there are no origins or only one, no sort. if (!origins || !origins[1]) { return; } + + // Count origins. for (length = 0; origins[length]; length++); - for(int step = 0; step