[Freeciv-Dev] (PR#8748) memory error with --file option
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<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
|
|