From: Wez Furlong Date: Sat, 1 Mar 2003 17:27:23 +0000 (+0000) Subject: Ensure that all fields are initialized to NULL. X-Git-Tag: RELEASE_0_5~674 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c3e6bcd398f09d6b25695113a4a1df27cda4b17e;p=php Ensure that all fields are initialized to NULL. --- diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index ce2a7a553d..b8fd2cd0f4 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -203,6 +203,7 @@ PHPAPI php_stream *_php_stream_fopen_from_fd(int fd, const char *mode STREAMS_DC php_stream *stream; self = emalloc_rel_orig(sizeof(*self)); + memset(self, 0, sizeof(*self)); self->file = NULL; self->is_pipe = 0; self->lock_flag = LOCK_UN; @@ -246,6 +247,7 @@ PHPAPI php_stream *_php_stream_fopen_from_file(FILE *file, const char *mode STRE php_stream *stream; self = emalloc_rel_orig(sizeof(*self)); + memset(self, 0, sizeof(*self)); self->file = file; self->is_pipe = 0; self->lock_flag = LOCK_UN; @@ -289,6 +291,7 @@ PHPAPI php_stream *_php_stream_fopen_from_pipe(FILE *file, const char *mode STRE php_stream *stream; self = emalloc_rel_orig(sizeof(*self)); + memset(self, 0, sizeof(*self)); self->file = file; self->is_pipe = 1; self->lock_flag = LOCK_UN;