cvs: php-src /main fopen_wrappers.c /main/streams plain_wrapper.c
| From: | Ilia Alshanetsky | Date: | Tue, 10 Feb 2009 16:14:35 +0000 |
| Subject: | cvs: php-src /main fopen_wrappers.c /main/streams plain_wrapper.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-56172@lists.php.net to get a copy of this message | ||
iliaa Tue Feb 10 16:14:35 2009 UTC
Modified files:
/php-src/main/streams plain_wrapper.c
/php-src/main fopen_wrappers.c
Log:
MFB:Adjust condition
http://cvs.php.net/viewvc.cgi/php-src/main/streams/plain_wrapper.c?r1=1.99&r2=1.100&diff_format=u
Index: php-src/main/streams/plain_wrapper.c
diff -u php-src/main/streams/plain_wrapper.c:1.99 php-src/main/streams/plain_wrapper.c:1.100
--- php-src/main/streams/plain_wrapper.c:1.99 Tue Feb 10 14:22:19 2009
+++ php-src/main/streams/plain_wrapper.c Tue Feb 10 16:14:35 2009
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: plain_wrapper.c,v 1.99 2009/02/10 14:22:19 iliaa Exp $ */
+/* $Id: plain_wrapper.c,v 1.100 2009/02/10 16:14:35 iliaa Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -1289,7 +1289,7 @@
/* getcwd() will return always return [DRIVE_LETTER]:/) on windows. */
*(cwd+3) = '\0';
- if (snprintf(trypath, MAXPATHLEN, "%s%s", cwd, filename) > MAXPATHLEN) {
+ if (snprintf(trypath, MAXPATHLEN, "%s%s", cwd, filename) >= MAXPATHLEN) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s/%s path was truncated to %d", cwd,
filename, MAXPATHLEN);
}
@@ -1343,7 +1343,7 @@
if (*ptr == '\0') {
goto stream_skip;
}
- 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);
}
http://cvs.php.net/viewvc.cgi/php-src/main/fopen_wrappers.c?r1=1.211&r2=1.212&diff_format=u
Index: php-src/main/fopen_wrappers.c
diff -u php-src/main/fopen_wrappers.c:1.211 php-src/main/fopen_wrappers.c:1.212
--- php-src/main/fopen_wrappers.c:1.211 Tue Feb 10 14:22:19 2009
+++ php-src/main/fopen_wrappers.c Tue Feb 10 16:14:35 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fopen_wrappers.c,v 1.211 2009/02/10 14:22:19 iliaa Exp $ */
+/* $Id: fopen_wrappers.c,v 1.212 2009/02/10 16:14:35 iliaa Exp $ */
/* {{{ includes
*/
@@ -636,7 +636,7 @@
*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);
}