|
From: Crossfire C. r. messages.
<cro...@li...> - 2018-11-19 00:53:45
|
Revision: 20611
http://sourceforge.net/p/crossfire/code/20611
Author: partmedia
Date: 2018-11-19 00:53:33 +0000 (Mon, 19 Nov 2018)
Log Message:
-----------
Pave over memory error
Modified Paths:
--------------
client/trunk/gtk-v2/src/main.c
Modified: client/trunk/gtk-v2/src/main.c
===================================================================
--- client/trunk/gtk-v2/src/main.c 2018-11-19 00:53:14 UTC (rev 20610)
+++ client/trunk/gtk-v2/src/main.c 2018-11-19 00:53:33 UTC (rev 20611)
@@ -310,7 +310,9 @@
static char *init_ui_layout(const char *name) {
guint retval = gtk_builder_add_from_file(window_xml, name, NULL);
if (retval > 0 && strlen(name) > 0) {
- strncpy(window_xml_file, name, sizeof(window_xml_file));
+ if (window_xml_file != name) { // FIXME: caught by Valgrind
+ strncpy(window_xml_file, name, sizeof(window_xml_file));
+ }
return window_xml_file;
} else {
return NULL;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|