[PECL-CVS] [pecl-web_services-oauth] memory-safety-audit: address reviews
[email protected] (Rasmus Lerdorf) Sun, 5 Apr 2026 01:32:15 +0000
| Newsgroups | php.pecl.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Rasmus Lerdorf (rlerdorf)
Date: 2026-04-04T21:32:09-04:00
Commit: https://github.com/php/pecl-web_services-oauth/commit/b89153b3626ecfcafa0a71206dcbc556fedc45ae
Raw diff: https://github.com/php/pecl-web_services-oauth/commit/b89153b3626ecfcafa0a71206dcbc556fedc45ae.diff
address reviews
Changed paths:
M provider.c
Diff:
diff --git a/provider.c b/provider.c
index 0ef63b3..654411d 100644
--- a/provider.c
+++ b/provider.c
@@ -195,7 +195,11 @@ 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 ? SUCCESS : FAILURE;
+ if (zend_hash_str_update(ht, key, strlen(key), val) == NULL) {
+ Z_TRY_DELREF_P(val);
+ return FAILURE;
+ }
+ return SUCCESS;
}
/* }}} */