diff options
| author | BeF | 2022-07-20 12:11:56 +0200 |
|---|---|---|
| committer | GitHub | 2022-07-20 12:11:56 +0200 |
| commit | 75595945d1d868fbd6db743809ca8a3eb5de3113 (patch) | |
| tree | e7cc3d1d4db617fc5ab1dbcc60f2366407eb5da5 /src/sp_execute.c | |
| parent | cbf0a9be15e4345bbe0da0c6be305434928ea759 (diff) | |
| parent | 72109c9bf016145364b19162a5ff998fc5858a9c (diff) | |
Merge branch 'master' into pr1
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 | } |
