[libvirt] [PATCH 3/4] xend: urlencode: Properly escape '&'

Cole Robinson crobinso at redhat.com
Fri Nov 19 16:15:38 UTC 2010


Since we send the sexpr to xend via HTTP, we need to properly escape
'&'

Signed-off-by: Cole Robinson <crobinso at redhat.com>
---
 src/xen/xend_internal.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
index d6d66bd..3ccadde 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -710,6 +710,7 @@ urlencode(const char *string)
         switch (string[i]) {
             case ' ':
             case '\n':
+            case '&':
                 snprintf(ptr, 4, "%%%02x", string[i]);
                 ptr += 3;
                 break;
-- 
1.7.3.2




More information about the libvir-list mailing list