summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sp_execute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sp_execute.c b/src/sp_execute.c
index 300d05c..6e80b6d 100644
--- a/src/sp_execute.c
+++ b/src/sp_execute.c
@@ -19,7 +19,7 @@ ZEND_COLD static inline void terminate_if_writable(char const* const filename) {
19 errmsg = "Attempted execution of a writable file"; 19 errmsg = "Attempted execution of a writable file";
20 goto violation; 20 goto violation;
21 } 21 }
22 if (errno != EACCES) { 22 if (errno != EACCES && errno != EROFS && errno != EPERM) {
23 goto err; 23 goto err;
24 } 24 }
25 25
@@ -45,7 +45,7 @@ ZEND_COLD static inline void terminate_if_writable(char const* const filename) {
45 efree(dirname); 45 efree(dirname);
46 goto violation; 46 goto violation;
47 } 47 }
48 if (errno != EACCES) { 48 if (errno != EACCES && errno != EROFS && errno != EPERM) {
49 efree(dirname); 49 efree(dirname);
50 goto err; 50 goto err;
51 } 51 }