From 12ca6112e5a6f8e5ec8e1fee09976ef973f99680 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 29 Sep 2012 20:15:13 -0700 Subject: 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 --- gtk-gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3-70-g09d2