Commit fce4c8f
committed
ext/ldap: fix crash in ldap_exop_sync() when $response_data is omitted
ldap_exop_sync() always takes the synchronous branch of php_ldap_exop(),
which assigns $response_data unconditionally. When the argument is not
passed, retdata is NULL and ZEND_TRY_ASSIGN_REF_STRINGL()/
ZEND_TRY_ASSIGN_REF_EMPTY_STRING() dereference it, so any successful
ldap_exop_sync($ldap, $oid) call segfaults. Guard the assignment the way
the $response_oid one already is.1 parent 26097c8 commit fce4c8f
2 files changed
Lines changed: 26 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4101 | 4101 | | |
4102 | 4102 | | |
4103 | 4103 | | |
4104 | | - | |
| 4104 | + | |
| 4105 | + | |
| 4106 | + | |
4105 | 4107 | | |
4106 | 4108 | | |
4107 | | - | |
| 4109 | + | |
4108 | 4110 | | |
4109 | 4111 | | |
4110 | 4112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments