Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] Re: (PR#10670) overlappying mystrlcpy
Home

[Freeciv-Dev] Re: (PR#10670) overlappying mystrlcpy

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#10670) overlappying mystrlcpy
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Thu, 21 Oct 2004 16:21:34 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10670 >

On Thu, 21 Oct 2004, Jason Short wrote:

>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=10670 >
>
> ==6225== Source and destination overlap in memcpy(0x8166A40, 0x8166A40, 10)
> ==6225==    at 0x1B906BCE: memcpy (mac_replace_strmem.c:113)
> ==6225==    by 0x80A51AE: mystrlcpy (support.c:235)
> ==6225==    by 0x8091378: tilespec_fullname (tilespec.c:302)
> ==6225==    by 0x80922DA: tilespec_read_toplevel (tilespec.c:756)
> ==6225==    by 0x80916CE: tilespec_reread (tilespec.c:430)
> ==6225==    by 0x80918C8: tilespec_reread_callback (tilespec.c:510)
> ==6225==    by 0x814640B: option_ok_command_callback (gamedlgs.c:393)
>
> I think this occurs in other places though.  One solution is to use
> memmove in mystrlcpy.

FWIW, memmove is supposedly slower than memcpy.

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa






[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#10670) overlappying mystrlcpy, Vasco Alexandre da Silva Costa <=