summaryrefslogtreecommitdiff
path: root/main/fopen_wrappers.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/fopen_wrappers.c')
-rw-r--r--main/fopen_wrappers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c
index 7f0fe74599..e1fbaa835b 100644
--- a/main/fopen_wrappers.c
+++ b/main/fopen_wrappers.c
@@ -528,7 +528,7 @@ PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const c
*end = '\0';
end++;
}
- if (snprintf(trypath, MAXPATHLEN, "%s/%s", ptr, filename) > MAXPATHLEN) {
+ if (snprintf(trypath, MAXPATHLEN, "%s/%s", ptr, filename) >= MAXPATHLEN) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s/%s path was truncated to %d", ptr, filename, MAXPATHLEN);
}
if (PG(safe_mode)) {