This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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: Wish for 2002


Andreas Schwabi <schwab@suse.de> wrote:
> Kaz Kylheku <kaz@ashi.footprints.net> writes:
> 
> |> The strlcat operation can be done like this: |>=20 |>
> snprintf(destination, limit, "%s%s", destination, source);
> 
> This is undefined, because destination is both read and written in an
> overlapping way.

Oops, you are right. For some reason I thought that exact overlap
is permitted, but ISO C clearly rules out any overlap whatsoever.
Thanks.


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