aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-12-07 23:24:59 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-12-07 23:24:59 +0000
commit3d8176b62da1e4e1a7f4be1982ae2fdb05640272 (patch)
treeabb4b9d773020812320298652a555062d997ecf1
parentb5ea37214751edd0f84306539ef456a2513e0241 (diff)
hex escape control and non 7-bit clean characters in uri_encode
In ast_uri_encode, non 7-bit clean characters were being hex escaped correctly, but control characters were not. (issue #16299) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@233609 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/utils.c b/main/utils.c
index 97991efe1..f835e11fc 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -394,7 +394,7 @@ char *ast_uri_encode(const char *string, char *outbuf, int buflen, int doreserve
/* If there's no characters to convert, just go through and don't do anything */
while (*ptr) {
- if (((unsigned char) *ptr) > 127 || (doreserved && strchr(reserved, *ptr)) ) {
+ if ((*ptr < 32) || (doreserved && strchr(reserved, *ptr))) {
/* Oops, we need to start working here */
if (!buf) {
buf = outbuf;