diff options
| author | Julien Voisin | 2022-07-20 15:42:11 +0200 |
|---|---|---|
| committer | GitHub | 2022-07-20 15:42:11 +0200 |
| commit | 74d46c7862ef6cc4ddd7c915689f037dcf778d0e (patch) | |
| tree | 0ca89faebc81b636ea47baf40cc1a6f35dcd17ed /src/sp_execute.c | |
| parent | cbf0a9be15e4345bbe0da0c6be305434928ea759 (diff) | |
| parent | 27c95af26d825e33eda09f1a863443252f16e1ae (diff) | |
Merge pull request #429 from sektioneins/master
fixes+features 07/2022
Diffstat (limited to 'src/sp_execute.c')
| -rw-r--r-- | src/sp_execute.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sp_execute.c b/src/sp_execute.c index 81614f3..b4e5c6c 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 2 | #include "ext/standard/php_string.h" | ||
| 2 | 3 | ||
| 3 | static void (*orig_execute_ex)(zend_execute_data *execute_data) = NULL; | 4 | static void (*orig_execute_ex)(zend_execute_data *execute_data) = NULL; |
| 4 | static void (*orig_zend_execute_internal)(zend_execute_data *execute_data, | 5 | static void (*orig_zend_execute_internal)(zend_execute_data *execute_data, |
| @@ -40,6 +41,7 @@ ZEND_COLD static inline void terminate_if_writable(char const* const filename) { | |||
| 40 | php_dirname(dirname, strlen(dirname)); | 41 | php_dirname(dirname, strlen(dirname)); |
| 41 | if (0 == access(dirname, W_OK)) { | 42 | if (0 == access(dirname, W_OK)) { |
| 42 | errmsg = "Attempted execution of a file in a writable directory"; | 43 | errmsg = "Attempted execution of a file in a writable directory"; |
| 44 | |||
| 43 | efree(dirname); | 45 | efree(dirname); |
| 44 | goto violation; | 46 | goto violation; |
| 45 | } | 47 | } |
