Skip to content

Commit

Permalink
dialer: fix stack buffer overflow
Browse files Browse the repository at this point in the history
Signed-off-by: hexian000 <[email protected]>
  • Loading branch information
hexian000 committed Oct 6, 2023
1 parent dae48cb commit 3db43b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dialer.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ send_socks5_req(struct dialer *restrict d, const struct dialaddr *restrict addr)
cap += sizeof(struct in6_addr) + sizeof(in_port_t);
break;
case ATYP_DOMAIN:
cap += 1 + addr->domain.len;
cap += 1 + addr->domain.len + sizeof(in_port_t);
break;
default:
FAIL();
Expand Down

0 comments on commit 3db43b5

Please sign in to comment.