com php-src: Make sure context is set to null to prevent use after free: main/streams/streams.c
| From: | Anatol Belski | Date: | Sun, 08 Nov 2015 04:13:31 +0000 |
| Subject: | com php-src: Make sure context is set to null to prevent use after free: main/streams/streams.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89676@lists.php.net to get a copy of this message | ||
Commit: 5645bbb9dbede176382f203e32bda72a90d8b4ee
Author: Caleb Champlin <caleb.champlin@gmail.com> Mon, 2 Nov 2015 21:58:04 +0000
Committer: Anatol Belski <ab@php.net> Sun, 8 Nov 2015 05:13:31 +0100
Parents: d61b7a6de44ea6b623cd5b17c3e5eacf9f59fde9
Branches: PHP-7.0.0
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5645bbb9dbede176382f203e32bda72a90d8b4ee
Log:
Make sure context is set to null to prevent use after free
Changed paths:
M main/streams/streams.c
Diff:
diff --git a/main/streams/streams.c b/main/streams/streams.c
index 7f919ca..8883a25 100644
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -84,6 +84,7 @@ fprintf(stderr, "forget_persistent: %s:%p\n", stream->ops->label,
stream);
if (stream->ctx) {
zend_list_delete(stream->ctx);
+ stream->ctx = NULL;
}
return 0;