theoretical case, maybe ...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98773
13f79535-47bb-0310-9956-
ffa450edef68
/* first create a match string which always has a trailing slash */
l = apr_cpystrn(matchbuf, match, sizeof(matchbuf) - 1) - matchbuf;
- if (matchbuf[l-1] != '/') {
+ if (!l || matchbuf[l-1] != '/') {
matchbuf[l] = '/';
matchbuf[l+1] = '\0';
l++;
/* and now add the base-URL as replacement prefix */
l = apr_cpystrn(substbuf, subst, sizeof(substbuf) - 1) - substbuf;
- if (substbuf[l-1] != '/') {
+ if (!l || substbuf[l-1] != '/') {
substbuf[l] = '/';
substbuf[l+1] = '\0';
l++;