]> granicus.if.org Git - php/commitdiff
Fix invalid dereference
authorBob Weinand <bobwei9@hotmail.com>
Thu, 16 Oct 2014 09:04:45 +0000 (11:04 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Thu, 16 Oct 2014 09:04:45 +0000 (11:04 +0200)
phpdbg_utils.c

index 41178870f405e443997bd49370ccd13634eb6041..991a6c23634f1fb9c6665dac3d08655c0977bf2b 100644 (file)
@@ -1103,7 +1103,7 @@ static void phpdbg_encode_ctrl_chars(char **buf, int *buflen) {
                        len += 4;
                        *tmpptr++ = '&';
                        *tmpptr++ = '#';
-                       if ((unsigned int) buf[i] > 10) {
+                       if ((unsigned int) ((*buf)[i]) > 10) {
                                *tmpptr++ = ((*buf)[i] / 10) + '0';
                        } else {
                                --len;