Skip to content

Commit 5d2ccf8

Browse files
committed
* Fix off by one error caught by UBsan CI build
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1927940 13f79535-47bb-0310-9956-ffa450edef68
1 parent 2176839 commit 5d2ccf8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

uri/apr_uri.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static char * percent_encode_scope_zone_id(apr_pool_t *p, apr_uri_t const *uptr)
146146
hostcopy[offset + 2] = '5';
147147
memcpy(hostcopy + offset + 3, uptr->hostname + offset + 1,
148148
len - offset - 1);
149-
hostcopy[len + 2] = '\0';
149+
hostcopy[len + 1] = '\0';
150150

151151
return hostcopy;
152152
}

0 commit comments

Comments
 (0)