This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: patch: fix trivial gdbserver arg parsing buglet
- From: Daniel Jacobowitz <drow at false dot org>
- To: Mat Hostetter <mat at lcs dot mit dot edu>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 27 Mar 2007 15:10:29 -0400
- Subject: Re: patch: fix trivial gdbserver arg parsing buglet
- References: <7uejnr720n.fsf@ld-1.internal.tilera.com>
On Wed, Mar 14, 2007 at 09:02:00PM -0400, Mat Hostetter wrote:
> The standard strtoul idiom is that strtoul succeeds when *arg_end == '\0'
> and the input string is not empty.
>
> This gdbserver code is incorrectly checking to see if the input
> string is empty by comparing the string pointer itself to '\0'
> rather than its first character.
>
> This bug is pretty harmless, but what the heck.
Whoops. Thanks for the patch; I checked it in.
--
Daniel Jacobowitz
CodeSourcery