Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] (PR#8748) memory error with --file option
Home

[Freeciv-Dev] (PR#8748) memory error with --file option

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#8748) memory error with --file option
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 16 May 2004 09:10:56 -0700
Reply-to: rt@xxxxxxxxxxx

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

> [per@xxxxxxxxxxx - Sat May 15 22:08:01 2004]:
> 
> Starting server with --file some.sav.gz gives this valgrind warning:
> 
> ==11130== Source and destination overlap in memcpy(0x82400b8,
0x82400b8, 32)
> ==11130==    at 0xA1C5B1: memcpy (mac_replace_strmem.c:95)
> ==11130==    by 0x804C44E: mystrlcpy (support.c:221)
> ==11130==    by 0x8054FE8: load_command (stdinhand.c:4111)
> ==11130==    by 0x804FAEA: srv_main (srv_main.c:1478)
> 
> I think whoever changed this code for conndlg made a slight mistake here.

A string is being copied onto itself.  This may fail and leave the
string in a garbage state for all i know.  Fortunately I doubt anyone
ever uses the string afterward.  It looks like the line can just be removed.

jason



[Prev in Thread] Current Thread [Next in Thread]