]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Fix an off-by-one error in buffer allocation
authorMikko Rasa <tdb@tdb.fi>
Tue, 21 Aug 2012 21:26:58 +0000 (00:26 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 21 Aug 2012 21:43:52 +0000 (00:43 +0300)
Signed-off-by: Mikko Rasa <tdb@tdb.fi>
gtk-gui.c

index 306e1a5e715ab8e5a6e890c3ce431cc2970ac218..ac80a47f41b5f2f848f08949e0f715e7fa7fa962 100644 (file)
--- 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);