[Privoxy-commits] [privoxy] 01/16: accept_connection(): Fix memory and socket leak
User Git
git at git.privoxy.org
Thu Oct 9 11:51:23 CEST 2025
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit a2af69c67f04e2fe09574ff8f92ca8b106aeb6c2
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Tue Sep 9 13:39:58 2025 +0200
accept_connection(): Fix memory and socket leak
... 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 | 3 +++
1 file changed, 3 insertions(+)
diff --git a/jbsockets.c b/jbsockets.c
index 3ec64a8c..1ff73b34 100644
--- 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;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Privoxy-commits
mailing list