Skip to content

Commit

Permalink
Partially revert most recent commit: host_name's length changes, so m…
Browse files Browse the repository at this point in the history
…ake sure to recalculate before iterating
  • Loading branch information
madlohe committed Aug 13, 2019
1 parent b26e3cb commit ddc6d28
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cgi/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ int main(void) {
if(NULL != strstr(host_name, "*")) {
/* allocate for 3 extra chars, ^, $ and \0 */
host_filter = malloc(sizeof(char) * (strlen(host_name) * 2 + 3));
len = strlen(host_name);
for(i = 0; i < len; i++, regex_i++) {
if(host_name[i] == '*') {
host_filter[regex_i++] = '.';
Expand Down

0 comments on commit ddc6d28

Please sign in to comment.