[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-patches
Subject: server/fd.c: Prevent using uninitialized pointers
From: Daniel Santos <javatroubadour () yahoo ! com>
Date: 2009-06-30 16:33:37
Message-ID: 108788.24042.qm () web45916 ! mail ! sp1 ! yahoo ! com
[Download RAW message or body]
Some pointers are getting used prior to initialization. It would appear that the \
current compilers are initializing them to zero or we've been lucky.
["0001-server-fd.c-Prevent-using-uninitialized-pointers.txt" (text/plain)]
From 7e2ce0afdd237fa4591a137a2df0f47ddddbbd5c Mon Sep 17 00:00:00 2001
From: Daniel Santos <daniel.santos@pobox.com>
Date: Tue, 30 Jun 2009 11:21:26 -0500
Subject: server/fd.c: Prevent using uninitialized pointers.
---
server/fd.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/server/fd.c b/server/fd.c
index a57001a..e9efc37 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -441,12 +441,12 @@ const char *get_timeout_str( timeout_t timeout )
/****************************************************************/
/* poll support */
-static struct fd **poll_users; /* users array */
-static struct pollfd *pollfd; /* poll fd array */
+static struct fd **poll_users = 0; /* users array */
+static struct pollfd *pollfd = 0; /* poll fd array */
static int nb_users; /* count of array entries actually in use */
static int active_users; /* current number of active users */
static int allocated_users; /* count of allocated entries in the array */
-static struct fd **freelist; /* list of free entries in the array */
+static struct fd **freelist = 0; /* list of free entries in the array */
static int get_next_timeout(void);
--
1.6.3.3
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic