projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9de3794
)
accept_connection(): Fix memory and socket leak
author
Fabian Keil
<fk@fabiankeil.de>
Tue, 9 Sep 2025 11:39:58 +0000
(13:39 +0200)
committer
Fabian Keil
<fk@fabiankeil.de>
Thu, 9 Oct 2025 09:51:07 +0000
(11:51 +0200)
... if the server name and port number ASCII decimal
representation don't fit. This is not expected to happen.
Reported by Joshua Rogers.
jbsockets.c
patch
|
blob
|
history
diff --git
a/jbsockets.c
b/jbsockets.c
index
3ec64a8
..
1ff73b3
100644
(file)
--- a/
jbsockets.c
+++ b/
jbsockets.c
@@
-1442,6
+1442,9
@@
int accept_connection(struct client_state * csp, jb_socket fds[])
"Server name (%s) and port number (%d) ASCII decimal representation "
"don't fit into %lu bytes",
host_addr, csp->config->hport[i], listen_addr_size);
+ freez(csp->ip_addr_str);
+ freez(csp->listen_addr_str);
+ close_socket(csp->cfd);
return 0;
}