Skip to content

Commit

Permalink
fix array index out-of-bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
andronoob committed Apr 22, 2021
1 parent 5755174 commit 9b0a5da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redsocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ static redsocks_hostname_read_rc redsocks_read_http_host(redsocks_client *client

memset(temp_hostname, 0, parser_data.http_host_length + 1);
memcpy(temp_hostname, parser_data.http_host, parser_data.http_host_length);
temp_hostname[parser_data.http_host_length + 1] = '\0';
temp_hostname[parser_data.http_host_length] = '\0'; //this should be redundant. (should already be covered by memset)

/* handle the http://host:port/ situation.
this is not yet handled by http-parser currently:
Expand Down

0 comments on commit 9b0a5da

Please sign in to comment.