Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Zend/zend_portability.h
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,14 @@ extern "C++" {
# define ZEND_INDIRECT_RETURN
#endif

#if __has_attribute(strub)
# define ZEND_STRUB __attribute__((strub))
# define ZEND_STRUB_OPT(o) __attribute__((strub(o)))
#else
# define ZEND_STRUB
# define ZEND_STRUB_OPT(o)
#endif

#define __ZEND_DO_PRAGMA(x) _Pragma(#x)
#define _ZEND_DO_PRAGMA(x) __ZEND_DO_PRAGMA(x)
#if defined(__clang__)
Expand Down
5 changes: 3 additions & 2 deletions ext/standard/password.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void php_password_algo_unregister(const char *ident) {
static int php_password_salt_to64(const char *str, const size_t str_len, const size_t out_len, char *ret) /* {{{ */
{
size_t pos = 0;
zend_string *buffer;
zend_string ZEND_STRUB *buffer;
if ((int) str_len < 0) {
return FAILURE;
}
Expand All @@ -76,7 +76,8 @@ static int php_password_salt_to64(const char *str, const size_t str_len, const s

static zend_string* php_password_make_salt(size_t length) /* {{{ */
{
zend_string *ret, *buffer;
zend_string *ret;
zend_string ZEND_STRUB *buffer;

if (length > (INT_MAX / 3)) {
zend_value_error("Length is too large to safely generate");
Expand Down