com php-src: Preventing possible segfault: phpdbg_btree.c

From: Date: Sun, 15 Dec 2013 14:15:34 +0000
Subject: com php-src: Preventing possible segfault: phpdbg_btree.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77107@lists.php.net to get a copy of this message
Commit: a7b0dfb7b12cdfb6cd78e5f1c686094d7a567555 Author: Bob Weinand <bobwei9@hotmail.com> Sun, 15 Dec 2013 09:15:34 -0500 Parents: d3c8d76e5b7cfec8f5b1727b17928518969c9da3 Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a7b0dfb7b12cdfb6cd78e5f1c686094d7a567555 Log: Preventing possible segfault Changed paths: M phpdbg_btree.c Diff: diff --git a/phpdbg_btree.c b/phpdbg_btree.c index f47422f..21f3fed 100644 --- a/phpdbg_btree.c +++ b/phpdbg_btree.c @@ -34,6 +34,10 @@ phpdbg_btree_result *phpdbg_btree_find(phpdbg_btree *tree, zend_ulong idx) { phpdbg_btree_branch *branch = tree->branch; int i = tree->depth - 1; + if (branch == NULL) { + return NULL; + } + do { if ((idx >> i) % 2 == 1) { if (branch->branches[1]) {

« previous php.cvs (#77107) next »