This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] gdbserver/hostio.c, handle_close: check for null


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]