]> granicus.if.org Git - php/commitdiff
Remove accidentally added null-byte in attributes
authorBob Weinand <bobwei9@hotmail.com>
Fri, 17 Oct 2014 17:39:09 +0000 (19:39 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Fri, 17 Oct 2014 17:39:09 +0000 (19:39 +0200)
phpdbg_utils.c

index 991a6c23634f1fb9c6665dac3d08655c0977bf2b..5f94d2164826069daf553e95a6a4ee879b67d758 100644 (file)
@@ -1069,7 +1069,7 @@ static int phpdbg_encode_xml(char **buf, char *msg, int msglen, int from, char *
        int i;
        int tolen = to ? strlen(to) : 5;
        char *tmp = *buf = emalloc(msglen * tolen);
-       for (i = 0; i++ < msglen; msg++) {
+       for (i = 0; ++i < msglen; msg++) {
                if (*msg == '&') {
                        memcpy(tmp, ZEND_STRL("&amp;"));
                        tmp += sizeof("&amp;") - 1;