Skip to content

Commit 4995116

Browse files
TimWollakocsismate
authored andcommitted
Add zend_mark_function_parameter_as_sensitive()
1 parent d9de363 commit 4995116

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Zend/zend_attributes.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,19 @@ static zend_always_inline zend_attribute *zend_add_class_constant_attribute(zend
116116
return zend_add_attribute(&c->attributes, name, argc, flags, 0, 0);
117117
}
118118

119+
static zend_always_inline zend_attribute *zend_mark_function_parameter_as_sensitive(const HashTable *table, const char *func_name, uint32_t parameter)
120+
{
121+
zend_function *func = zend_hash_str_find_ptr(table, func_name, strlen(func_name));
122+
ZEND_ASSERT(func != NULL);
123+
124+
return zend_add_parameter_attribute(
125+
func,
126+
parameter,
127+
zend_ce_sensitive_parameter->name,
128+
0
129+
);
130+
}
131+
119132
void zend_register_attribute_ce(void);
120133
void zend_attributes_shutdown(void);
121134

0 commit comments

Comments
 (0)