php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch 0001-Fix-77360-class_uses-causes-segfault.txt for SPL related Bug #77360

Patch version 2018-12-27 14:17 UTC

Return to Bug #77360 | Download this patch
Patch Revisions:

Developer: lauri.kentta@gmail.com

From e44503ce0e04cc59b1f3f2fd1e8f38cc1fdb61a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lauri=20Kentt=C3=A4?= <lauri.kentta@gmail.com>
Date: Thu, 27 Dec 2018 16:16:29 +0200
Subject: [PATCH] Fix #77360: class_uses causes segfault

---
 ext/spl/php_spl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c
index b5379baae0..4da4201f88 100644
--- a/ext/spl/php_spl.c
+++ b/ext/spl/php_spl.c
@@ -69,7 +69,7 @@ static zend_class_entry * spl_find_ce_by_name(zend_string *name, zend_bool autol
 		zend_string *lc_name = zend_string_tolower(name);
 
 		ce = zend_hash_find_ptr(EG(class_table), lc_name);
-		zend_string_free(lc_name);
+		zend_string_release(lc_name);
 	} else {
  		ce = zend_lookup_class(name);
  	}
-- 
2.20.1

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC