This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] zero-terminate result of target_read_alloc
- From: "Mark Kettenis" <mark dot kettenis at xs4all dot nl>
- To: "Vladimir Prus" <vladimir at codesourcery dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 18 Jul 2006 13:25:22 +0200 (CEST)
- Subject: Re: [PATCH] zero-terminate result of target_read_alloc
- References: <200607181356.16071.vladimir@codesourcery.com>
>
> This patch makes result of target_read_alloc zero-terminated.
> The point is that often the object is not allowed to contain embedded
> zeros,
> and working with zero-terminated strings is much easier.
>
> OK?
This is wrong. Either the terminating nul is part of the object you're
reading or it is not. GDB shouldn't at its own.
>
> - Volodya
>
> 2006-07-18 Vladimir Prus <vladimir@codesourcery.com>
>
> * target.c (target_read_alloc): Zero-terminate result.
>
>