From c6be2404dafcb5032f8e35d31bca570f0ae80ef6 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 22 Aug 2012 00:26:58 +0300 Subject: [PATCH] Fix an off-by-one error in buffer allocation Signed-off-by: Mikko Rasa --- gtk-gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk-gui.c b/gtk-gui.c index 306e1a5..ac80a47 100644 --- a/gtk-gui.c +++ b/gtk-gui.c @@ -223,7 +223,7 @@ static gboolean ask_save_changes() label = gtk_label_new ( "You have unsaved changes\nWould you like to save those before exiting the program?"); } else { - char *label_text = (char*) malloc(sizeof(char) * (92 + strlen(existing_filename))); + char *label_text = (char*) malloc(sizeof(char) * (93 + strlen(existing_filename))); sprintf(label_text, "You have unsaved changes to file: %s \nWould you like to save those before exiting the program?", existing_filename); -- 2.45.2