Commit: f08060a48fadf079e860be73584ac87747dc59d6 Author: Remi Collet <r...@php.net> Wed, 28 Nov 2012 10:28:18 +0100 Parents: 1e6baa26734d827be6d279b111dcce6d2f39b6df Branches: PHP-5.3
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f08060a48fadf079e860be73584ac87747dc59d6 Log: Fixed Bug #63581 Possible null dereference Possible NULL dereference when trying to delete the single item of a list (ack from fat). This issues where found from by static code analysis tool and, so, I can't provide any reproducer. Bugs: https://bugs.php.net/63581 Changed paths: M sapi/fpm/fpm/fpm_events.c Diff: diff --git a/sapi/fpm/fpm/fpm_events.c b/sapi/fpm/fpm/fpm_events.c index d5f7483..d5835f0 100644 --- a/sapi/fpm/fpm/fpm_events.c +++ b/sapi/fpm/fpm/fpm_events.c @@ -188,7 +188,9 @@ static int fpm_event_queue_del(struct fpm_event_queue_s **queue, struct fpm_even } if (q == *queue) { *queue = q->next; - (*queue)->prev = NULL; + if (*queue) { + (*queue)->prev = NULL; + } } /* ask the event module to remove the fd from its own queue */ @@ -432,7 +434,9 @@ void fpm_event_loop(int err) /* {{{ */ } if (q == fpm_event_queue_timer) { fpm_event_queue_timer = q->next; - fpm_event_queue_timer->prev = NULL; + if (fpm_event_queue_timer) { + fpm_event_queue_timer->prev = NULL; + } } q = q->next; free(q2); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php