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: patch: fix trivial gdbserver arg parsing buglet


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


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