bjori           Thu Nov 16 16:08:09 2006 UTC

  Modified files:              
    /php-src/main/streams       plain_wrapper.c 
  Log:
  MFB: Fix ftruncate() with negative size
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/streams/plain_wrapper.c?r1=1.77&r2=1.78&diff_format=u
Index: php-src/main/streams/plain_wrapper.c
diff -u php-src/main/streams/plain_wrapper.c:1.77 
php-src/main/streams/plain_wrapper.c:1.78
--- php-src/main/streams/plain_wrapper.c:1.77   Fri Nov 10 13:18:46 2006
+++ php-src/main/streams/plain_wrapper.c        Thu Nov 16 16:08:09 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: plain_wrapper.c,v 1.77 2006/11/10 13:18:46 dmitry Exp $ */
+/* $Id: plain_wrapper.c,v 1.78 2006/11/16 16:08:09 bjori Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -765,7 +765,7 @@
                                        return fd == -1 ? 
PHP_STREAM_OPTION_RETURN_ERR : PHP_STREAM_OPTION_RETURN_OK;
 
                                case PHP_STREAM_TRUNCATE_SET_SIZE:
-                                       return ftruncate(fd, 
*(size_t*)ptrparam) == 0 ? PHP_STREAM_OPTION_RETURN_OK : 
PHP_STREAM_OPTION_RETURN_ERR;
+                                       return ftruncate(fd, 
*(ptrdiff_t*)ptrparam) == 0 ? PHP_STREAM_OPTION_RETURN_OK : 
PHP_STREAM_OPTION_RETURN_ERR;
                        }
                        
                default:

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to