Skip to content

Commit 1ef3fd4

Browse files
committed
code: avoid casting const char * to char * by copying in http.c
Signed-off-by: Hans Zandbelt <[email protected]>
1 parent 3c31107 commit 1ef3fd4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/http.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ char *oidc_http_url_decode(const request_rec *r, const char *str) {
117117
goto end;
118118
}
119119

120-
replaced = (char *)str;
121-
while (str[counter] != '\0') {
122-
if (str[counter] == '+') {
120+
replaced = apr_pstrdup(r->pool, str);
121+
while (replaced[counter] != '\0') {
122+
if (replaced[counter] == '+') {
123123
replaced[counter] = ' ';
124124
}
125125
counter++;

0 commit comments

Comments
 (0)