Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] (PR#12731) stdinhand.c overwrites own memory
Home

[Freeciv-Dev] (PR#12731) stdinhand.c overwrites own memory

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12731) stdinhand.c overwrites own memory
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Wed, 6 Apr 2005 11:13:25 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12731 >

==18671== Source and destination overlap in memcpy(0x81BFA58, 0x81BFA58, 33)
==18671==    at 0x1B9047C9: memcpy (mac_replace_strmem.c:113)
==18671==    by 0x804D49D: mystrlcpy (support.c:240)
==18671==    by 0x805637C: load_command (stdinhand.c:3207)
==18671==    by 0x8051063: srv_main (srv_main.c:1655)
==18671==    by 0x804A42A: main (civserver.c:242)

srv_main.c: (void) load_command(NULL, srvarg.load_filename, FALSE);
stdinhand.c: bool load_command(struct connection *caller, char *arg,
                               bool check)
stdinhand.c: sz_strlcpy(srvarg.load_filename, arg);

Yeah, pretty stupid, that one.

  - Per





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12731) stdinhand.c overwrites own memory, Per I. Mathisen <=