]> granicus.if.org Git - php/commitdiff
Fix wrong exec length on relative paths
authorBob Weinand <bobwei9@hotmail.com>
Tue, 28 Oct 2014 12:27:20 +0000 (13:27 +0100)
committerBob Weinand <bobwei9@hotmail.com>
Tue, 28 Oct 2014 16:25:45 +0000 (17:25 +0100)
sapi/phpdbg/phpdbg.c

index 9c56b1d7bc9ddea099844a3cfef6902f9bf04dc0..4bfbf4c1e918f95df5fde201352374058929033f 100644 (file)
@@ -1466,7 +1466,7 @@ phpdbg_main:
 
                if (exec) { /* set execution context */
                        PHPDBG_G(exec) = phpdbg_resolve_path(exec TSRMLS_CC);
-                       PHPDBG_G(exec_len) = strlen(exec);
+                       PHPDBG_G(exec_len) = PHPDBG_G(exec) ? strlen(PHPDBG_G(exec)) : 0;
 
                        free(exec);
                        exec = NULL;