This is an automated email from the ASF dual-hosted git repository.

ChristopherSchultz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat-connectors.git

commit 21987720da59ea06b703c5d304c5b34824371423
Author: Christopher Schultz <[email protected]>
AuthorDate: Mon Jun 8 16:59:02 2026 -0400

    Add overrun protection
    
    Reduce unnecessary safety margin
---
 native/common/jk_ajp12_worker.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/native/common/jk_ajp12_worker.c b/native/common/jk_ajp12_worker.c
index d9d860ba5..40f45fbe3 100644
--- a/native/common/jk_ajp12_worker.c
+++ b/native/common/jk_ajp12_worker.c
@@ -390,8 +390,8 @@ static int ajpv12_mark(ajp12_endpoint_t * p, unsigned char 
type)
 
 static int ajpv12_sendint(ajp12_endpoint_t * p, int d)
 {
-    char buf[20];
-    sprintf(buf, "%d", d);
+    char buf[16];
+    snprintf(buf, sizeof(buf), "%d", d);
     return ajpv12_sendstring(p, buf);
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to