[PATCH] Fix a bug in cmd_qtbuffer.

Pedro Alves palves@redhat.com
Tue Feb 26 11:23:00 GMT 2013


On 02/25/2013 03:11 AM, Yao Qi wrote:
> Hi,
> When playing with packet "qTBuffer", I find a bug in cmd_qtbuffer.  We
> don't have to set '\0' to OWN_BUF, because convert_int_to_ascii did
> that.  On the other hand, it is incorrect to set '\0' to own_buf[num]
> because convert_int_to_ascii writes 2 * num of bytes to OWN_BUF, it
> is correct to set '\0' to own_buf[2 * num].  This patch fixes the bug
> I found when using "qTBuffer".
> 
> Regression tested on x86_64-linux.  OK?

OK, thanks.

-- 
Pedro Alves



More information about the Gdb-patches mailing list