svn commit: r1927940 - apr/apr/trunk/uri

[email protected]
Newsgroups gmane.comp.apache.apr.cvs
Message-ID <175576869988.3392494.12915653520156962110@svn02-us-east.apache.org>
Author: rpluem
Date: Thu Aug 21 09:31:39 2025
New Revision: 1927940

Log:
* Fix off by one error caught by UBsan CI build

Modified:
   apr/apr/trunk/uri/apr_uri.c

Modified: apr/apr/trunk/uri/apr_uri.c
==============================================================================
--- apr/apr/trunk/uri/apr_uri.c	Thu Aug 21 09:04:05 2025	(r1927939)
+++ apr/apr/trunk/uri/apr_uri.c	Thu Aug 21 09:31:39 2025	(r1927940)
@@ -146,7 +146,7 @@ static char * percent_encode_scope_zone_
     hostcopy[offset + 2] = '5';
     memcpy(hostcopy + offset + 3, uptr->hostname + offset + 1,
            len - offset - 1);
-    hostcopy[len + 2] = '\0';
+    hostcopy[len + 1] = '\0';
 
     return hostcopy;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.