Skip to content

Commit d0e3919

Browse files
Dennis Buteyncmb69
Dennis Buteyn
authored andcommitted
Close GH-10217: Use strlen() for determining the class_name length
Closes GH-10231.
1 parent 5033f6f commit d0e3919

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ PHP NEWS
1818
. Added shadow stack support for fibers. (Chen Hu)
1919
. Fix bug GH-9965 (Fix accidental caching of default arguments with side
2020
effects). (ilutov)
21+
. Implement GH-10217 (Use strlen() for determining the class_name length).
22+
(Dennis Buteyn)
2123

2224
- Fileinfo:
2325
. Upgrade bundled libmagic to 5.43. (Anatol)

Zend/zend_API.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ typedef struct _zend_fcall_info_cache {
267267
#endif
268268

269269
#define INIT_CLASS_ENTRY(class_container, class_name, functions) \
270-
INIT_CLASS_ENTRY_EX(class_container, class_name, sizeof(class_name)-1, functions)
270+
INIT_CLASS_ENTRY_EX(class_container, class_name, strlen(class_name), functions)
271271

272272
#define INIT_CLASS_ENTRY_EX(class_container, class_name, class_name_len, functions) \
273273
{ \

0 commit comments

Comments
 (0)