This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] target_read_string, potential memory leak.
- From: Jim Blandy <jimb at codesourcery dot com>
- To: msnyder at sonic dot net
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 06 Aug 2007 15:30:44 -0700
- Subject: Re: [patch] target_read_string, potential memory leak.
- References: <13153.12.7.175.2.1186284546.squirrel@webmail.sonic.net>
msnyder@sonic.net writes:
> OK -- it would be pretty stupid to call target_read_string without
> passing it a buffer, but if we're going to check it for null...
I don't think the contract for target_read_string permits STRING to be
null. I think either the test should go, or we should add a
gdb_assert (string).