cvs: php4 /ext/standard file.c
| From: | Jani Taskinen | Date: | Sat, 07 Apr 2001 21:46:43 +0000 |
| Subject: | cvs: php4 /ext/standard file.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-5028@lists.php.net to get a copy of this message | ||
sniper Sat Apr 7 14:46:43 2001 EDT
Modified files:
/php4/ext/standard file.c
Log:
ws pollution removed.
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.149 php4/ext/standard/file.c:1.150
--- php4/ext/standard/file.c:1.149 Fri Mar 23 01:30:51 2001
+++ php4/ext/standard/file.c Sat Apr 7 14:46:43 2001
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.149 2001/03/23 09:30:51 romolo Exp $ */
+/* $Id: file.c,v 1.150 2001/04/07 21:46:43 sniper Exp $ */
/* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
@@ -906,15 +906,17 @@
convert_to_long_ex(arg2);
len = (*arg2)->value.lval;
- if (len < 0) {
+
+ if (len < 0) {
php_error(E_WARNING, "length parameter to fgets() may not be negative");
RETURN_FALSE;
- }
+ }
if (type == le_socket) {
issock=1;
socketd=*(int*)what;
}
+
buf = emalloc(sizeof(char) * (len + 1));
/* needed because recv doesnt put a null at the end*/
memset(buf,0,len+1);