diff --git a/ChangeLog b/ChangeLog index b56b763aaa..d8575a1fff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-05-30 Mukund Sivaraman + + * plug-ins/common/gqbist.c: Use strncpy() instead of strcpy() to + avoid buffer overflows. + 2007-05-30 Mukund Sivaraman * plug-ins/common/gtm.c: Use strncpy() instead of strcpy() to avoid diff --git a/plug-ins/common/gqbist.c b/plug-ins/common/gqbist.c index e9802649e0..780e761713 100644 --- a/plug-ins/common/gqbist.c +++ b/plug-ins/common/gqbist.c @@ -725,7 +725,7 @@ dialog_load (GtkWidget *widget, { gchar *name = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); - strcpy (qbist_info.path, name); + strncpy (qbist_info.path, name, PATH_MAX - 1); load_data (qbist_info.path); g_free (name); @@ -770,7 +770,7 @@ dialog_save (GtkWidget *widget, { gchar *name = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); - strcpy (qbist_info.path, name); + strncpy (qbist_info.path, name, PATH_MAX - 1); save_data (qbist_info.path); g_free (name);