This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] gdbserver/hostio.c, handle_close: check for null
- From: Michael Snyder <msnyder at vmware dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 11 Mar 2011 14:38:12 -0800
- Subject: Re: [RFA] gdbserver/hostio.c, handle_close: check for null
- References: <4D71488B.8000304@vmware.com>
Michael Snyder wrote:
This one's a little iffey...
The conditional in the while loop implies that the pointer may wind up
as null. Therefore it would make sense to check it for null before
dereferencing it.
Alternatively, if it can't wind up as null, we should take the test out
of the while loop.
Ping?