summaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-09-29 20:15:13 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-09-29 20:17:08 -0700
commit12ca6112e5a6f8e5ec8e1fee09976ef973f99680 (patch)
treee4e9ac1dd832036bca0f57ef58642a7f63fefe15 /gtk-gui.c
parent82abbf59046370c02e12d38a6f2fab026b1b078d (diff)
downloadsubsurface-12ca6112e5a6f8e5ec8e1fee09976ef973f99680.tar.gz
Counting is hard
When updating the "You have usnaved change..." string I didn't pay attention and missed the fact that we used it's hard coded length above to allocate a large enough buffer. Thanks you, Valgrind. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index 7f60b62fd..0c74675a4 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -231,7 +231,7 @@ static gboolean ask_save_changes()
label = gtk_label_new (
"You have unsaved changes\nWould you like to save those before closing the datafile?");
} else {
- char *label_text = (char*) malloc(sizeof(char) * (93 + strlen(existing_filename)));
+ char *label_text = (char*) malloc(sizeof(char) * (94 + strlen(existing_filename)));
sprintf(label_text,
"You have unsaved changes to file: %s \nWould you like to save those before closing the datafile?",
existing_filename);