summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2011-11-22 23:26:30 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2011-11-22 23:26:30 +0000
commit64c8c180159b756941d350ac3c7f33be568c195b (patch)
treeb5d1e9bc06b8bf994d9ae424435707620c5a17da /src
parent2984d55f5404f82567bb0e07b66b9bcbb26257ed (diff)
downloadneon-64c8c180159b756941d350ac3c7f33be568c195b.tar.gz
* src/ne_uri.c (ne_path_escape): Fix over-allocation of memory.
(Pierre Crokaert <pct actl.be>) git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1864 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'src')
-rw-r--r--src/ne_uri.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ne_uri.c b/src/ne_uri.c
index 8d86c31..4d0ab91 100644
--- a/src/ne_uri.c
+++ b/src/ne_uri.c
@@ -474,8 +474,8 @@ char *ne_path_unescape(const char *uri)
}
/* CH must be an unsigned char; evaluates to 1 if CH should be
- * percent-encoded. */
-#define path_escape_ch(ch) (uri_lookup(ch) & URI_ESCAPE)
+ * percent-encoded (note !!x == x ? 1 : 0). */
+#define path_escape_ch(ch) (!!(uri_lookup(ch) & URI_ESCAPE))
char *ne_path_escape(const char *path)
{