[PHP-DEV] Re: [PHP-CVS] cvs: php4 /main streams.c

2002-11-22 Thread Marcus Börger
I thought there was another error somewhere but it seems it
was the efree and then requesting the memory. Without the
patch i simply got "*RECURSION*" out of php. Anybody able
to explain this?

marcus

At 02:24 23.11.2002, Marcus Boerger wrote:

helly   Fri Nov 22 20:24:08 2002 EDT

  Modified files:
/php4/main  streams.c
  Log:
  MFB: Fix memleak in debug mode


Index: php4/main/streams.c
diff -u php4/main/streams.c:1.130 php4/main/streams.c:1.131
--- php4/main/streams.c:1.130   Mon Nov 18 12:23:21 2002
+++ php4/main/streams.c Fri Nov 22 20:24:08 2002
@@ -20,7 +20,7 @@
+--+
  */

-/* $Id: streams.c,v 1.130 2002/11/18 17:23:21 helly Exp $ */
+/* $Id: streams.c,v 1.131 2002/11/23 01:24:08 helly Exp $ */

 #define _GNU_SOURCE
 #include "php.h"
@@ -2317,7 +2317,7 @@
return stream;
case PHP_STREAM_RELEASED:
 #if ZEND_DEBUG
-   newstream->__orig_path = copy_of_path;
+   newstream->__orig_path = 
estrdup(copy_of_path);
 #endif
return newstream;
default:



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


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




[PHP-DEV] Re: [PHP-CVS] cvs: php4 /main streams.c

2002-10-28 Thread Yasuo Ohgaki
Wez Furlong wrote:

Hey Ilia,

Does this prevent opening of things like block and character special files?
If yes, then let's change it to explicitly check for directories instead,
as there are bound to be people out there that want to open things like
/dev/hda1 (for example).


And named pipes, too?

--
Yasuo Ohgaki



--Wez.

On 28/10/02, "Ilia Alshanetsky" <[EMAIL PROTECTED]> wrote:


 Fixed bug #20110.
+		if (fstat(fileno(fp), &st) == -1 || !S_ISREG(st.st_mode)) {








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




Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /main streams.c

2002-10-28 Thread Andrei Zmievski
On Mon, 28 Oct 2002, Derick Rethans wrote:
> > Hey Ilia,
> > 
> > Does this prevent opening of things like block and character special files?
> > If yes, then let's change it to explicitly check for directories instead,
> > as there are bound to be people out there that want to open things like
> > /dev/hda1 (for example).
> 
> You want to open that for writing? :)

That's what Real Programmers [TM] do.

-Andrei   http://www.gravitonic.com/
* If Bill Gates had a nickel for every time Windows crashed.. Oh, wait.. *

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




Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /main streams.c

2002-10-27 Thread Derick Rethans
On Mon, 28 Oct 2002, Wez Furlong wrote:

> Hey Ilia,
> 
> Does this prevent opening of things like block and character special files?
> If yes, then let's change it to explicitly check for directories instead,
> as there are bound to be people out there that want to open things like
> /dev/hda1 (for example).

You want to open that for writing? :)

Derick

--

---
 Derick Rethans   http://derickrethans.nl/ 
 JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


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




[PHP-DEV] Re: [PHP-CVS] cvs: php4 /main streams.c

2002-10-27 Thread Sebastian Bergmann
Ilia Alshanetsky wrote:
> iliaa   Sun Oct 27 19:28:11 2002 EDT
>
>   Modified files:
> /php4/main  streams.c
>   Log:
>   Fixed bug #20110.

  Unresolved external symbol _S_ISREG.

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

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




[PHP-DEV] Re: [PHP-CVS] cvs: php4 /main streams.c

2002-10-27 Thread Wez Furlong
Hey Ilia,

Does this prevent opening of things like block and character special files?
If yes, then let's change it to explicitly check for directories instead,
as there are bound to be people out there that want to open things like
/dev/hda1 (for example).

--Wez.

On 28/10/02, "Ilia Alshanetsky" <[EMAIL PROTECTED]> wrote:
>   Fixed bug #20110.
> + if (fstat(fileno(fp), &st) == -1 || !S_ISREG(st.st_mode)) {




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




Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /main streams.c

2002-09-23 Thread Sebastian Bergmann

Wez Furlong wrote:
> It's looking really ugly - maybe there is a better way?

  No warning :)

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

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




Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /main streams.c

2002-09-23 Thread Wez Furlong

Can you try this instead:

if (eol && (size_t)((ptrdiff_t)eol + 1 - (ptrdiff_t)readptr) <= maxlen - 1) {
   justread = eol + 1 - readptr;

It's looking really ugly - maybe there is a better way?

--Wez.

On 09/23/02, "Sebastian Bergmann" <[EMAIL PROTECTED]> wrote:
>   It compiles again, but:
> 
> c:\home\php\php4\main\streams.c(517): warning C4018:
> '<=': Conflict between signed and unsigned



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




[PHP-DEV] Re: [PHP-CVS] cvs: php4 /main streams.c

2002-09-23 Thread Sebastian Bergmann

Wez Furlong wrote:
> wez Mon Sep 23 11:21:17 2002 EDT
>
>   Modified files:
> /php4/main  streams.c
>   Log:
>   Hopefully fix the other warnings that my last warning-fixing commit 
>   caused.

  It compiles again, but:

c:\home\php\php4\main\streams.c(517): warning C4018:
'<=': Conflict between signed and unsigned

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

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




[PHP-DEV] Re: [PHP-CVS] cvs: php4 /main streams.c

2002-03-16 Thread Marcus Börger

SORRY

i checked and reloaded the file and i have no idea why whitespaces
have changed - maybe i will change my editor...

marcus

At 21:05 16.03.2002, you wrote:
>helly   Sat Mar 16 15:05:08 2002 EDT
>
>   Modified files:
> /php4/main  streams.c
>   Log:
>   -copy_stream_to_stream returns size if maxlen ==  PHP_STREAM_COPY_ALL
>   #had to commit myself to do the rest...
>
>Index: php4/main/streams.c
>diff -u php4/main/streams.c:1.23 php4/main/streams.c:1.24
>--- php4/main/streams.c:1.23Sat Mar 16 13:52:03 2002
>+++ php4/main/streams.c Sat Mar 16 15:05:08 2002
>@@ -83,14 +83,14 @@
> */
> return fclose(stream->stdiocast);
> }
>-
>+


bla


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