Fix length of buffer in previous change - one too short before

svn path=/trunk/netsurf/; revision=3358
This commit is contained in:
Rob Kendrick 2007-06-22 15:23:42 +00:00
parent 9964008dc0
commit dabd37b0b2

View File

@ -347,7 +347,7 @@ gboolean nsgtk_openfile_open(GtkWidget *widget, gpointer data)
current_model->top_level); current_model->top_level);
char *filename = gtk_file_chooser_get_filename( char *filename = gtk_file_chooser_get_filename(
GTK_FILE_CHOOSER(wndOpenFile)); GTK_FILE_CHOOSER(wndOpenFile));
char *url = malloc(strlen(filename) + strlen("file://")); char *url = malloc(strlen(filename) + strlen("file://") + 1);
sprintf(url, "file://%s", filename); sprintf(url, "file://%s", filename);