commit: r1864 - neon/trunk/src

joe at manyfish.co.uk joe at manyfish.co.uk
Tue Nov 22 18:26:32 EST 2011


Author: joe
Date: Tue Nov 22 23:26:30 2011
New Revision: 1864

Modified:
   neon/trunk/src/ne_uri.c

Log:
* src/ne_uri.c (ne_path_escape): Fix over-allocation of memory.
  (Pierre Crokaert <pct actl.be>)


Modified: neon/trunk/src/ne_uri.c
==============================================================================
--- neon/trunk/src/ne_uri.c	(original)
+++ neon/trunk/src/ne_uri.c	Tue Nov 22 23:26:30 2011
@@ -474,8 +474,8 @@
 }
 
 /* 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) 
 {



More information about the neon-commits mailing list