[PECL-CVS] [pecl-web_services-oauth] memory-safety-audit: address reviews
[email protected] (Rasmus Lerdorf) Sun, 5 Apr 2026 01:16:32 +0000
| Newsgroups | php.pecl.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Rasmus Lerdorf (rlerdorf)
Date: 2026-04-04T21:16:26-04:00
Commit: https://github.com/php/pecl-web_services-oauth/commit/57a1f3f4afae4afbb5ba8f38c89faee24a854104
Raw diff: https://github.com/php/pecl-web_services-oauth/commit/57a1f3f4afae4afbb5ba8f38c89faee24a854104.diff
address reviews
Changed paths:
M provider.c
Diff:
diff --git a/provider.c b/provider.c
index 56dffc7..0ef63b3 100644
--- a/provider.c
+++ b/provider.c
@@ -195,7 +195,7 @@ static void oauth_provider_set_std_params(zval *provider_obj, HashTable *sbs_var
static inline int oauth_provider_set_param_value(HashTable *ht, char *key, zval *val) /* {{{ */
{
Z_TRY_ADDREF_P(val);
- return zend_hash_str_update(ht, key, strlen(key), val) != NULL;
+ return zend_hash_str_update(ht, key, strlen(key), val) != NULL ? SUCCESS : FAILURE;
}
/* }}} */
@@ -254,6 +254,8 @@ static int oauth_provider_parse_auth_header(php_oauth_provider *sop, char *auth_
);
if (0 == Z_LVAL(return_value)) {
+ zval_ptr_dtor(&return_value);
+ zval_ptr_dtor(&subpats);
#if PHP_VERSION_ID >= 70400
zend_string_release(s_auth_header);
#endif