[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 23/219: urlapi: urlencode characters above 0x7f cor
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 23/219: urlapi: urlencode characters above 0x7f correctly |
Date: |
Wed, 22 May 2019 19:16:02 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 0dd47c2a3d53b1297be3534f8c09d3b86564d3db
Author: Jakub Zakrzewski <address@hidden>
AuthorDate: Sat Apr 6 13:48:18 2019 +0200
urlapi: urlencode characters above 0x7f correctly
fixes #3741
Closes #3742
---
lib/urlapi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/urlapi.c b/lib/urlapi.c
index a19867eb0..04b04923e 100644
--- a/lib/urlapi.c
+++ b/lib/urlapi.c
@@ -1273,7 +1273,7 @@ CURLUcode curl_url_set(CURLU *u, CURLUPart what,
size_t nalloc = strlen(part);
if(urlencode) {
- const char *i;
+ const unsigned char *i;
char *o;
bool free_part = FALSE;
char *enc = malloc(nalloc * 3 + 1); /* for worst case! */
@@ -1281,7 +1281,7 @@ CURLUcode curl_url_set(CURLU *u, CURLUPart what,
return CURLUE_OUT_OF_MEMORY;
if(plusencode) {
/* space to plus */
- i = part;
+ i = (const unsigned char *)part;
for(o = enc; *i; ++o, ++i)
*o = (*i == ' ') ? '+' : *i;
*o = 0; /* zero terminate */
@@ -1292,7 +1292,7 @@ CURLUcode curl_url_set(CURLU *u, CURLUPart what,
}
free_part = TRUE;
}
- for(i = part, o = enc; *i; i++) {
+ for(i = (const unsigned char *)part, o = enc; *i; i++) {
if(Curl_isunreserved(*i) ||
((*i == '/') && urlskipslash) ||
((*i == '=') && equalsencode) ||
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnurl] 23/219: urlapi: urlencode characters above 0x7f correctly,
gnunet <=