mirror of https://github.com/GNOME/gimp.git
Use strncpy() instead of strcpy() to avoid buffer overflows.
2007-05-30 Mukund Sivaraman <muks@mukund.org> * plug-ins/common/gqbist.c: Use strncpy() instead of strcpy() to avoid buffer overflows. svn path=/trunk/; revision=22667
This commit is contained in:
parent
8b3e91c015
commit
ddd9121be0
|
@ -1,3 +1,8 @@
|
|||
2007-05-30 Mukund Sivaraman <muks@mukund.org>
|
||||
|
||||
* plug-ins/common/gqbist.c: Use strncpy() instead of strcpy() to
|
||||
avoid buffer overflows.
|
||||
|
||||
2007-05-30 Mukund Sivaraman <muks@mukund.org>
|
||||
|
||||
* plug-ins/common/gtm.c: Use strncpy() instead of strcpy() to avoid
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue