Search
lxdream.org :: lxdream :: r764:44f5670ada62
lxdream 0.9.1
released Jun 29
Download Now
changeset764:44f5670ada62
parent763:b3ce4448f200
child765:4cd066048203
authornkeynes
dateWed Jul 23 11:10:49 2008 +0000 (11 years ago)
Change sprintf to snprintf (safer)
src/gtkui/gtk_ctrl.c
1.1 --- a/src/gtkui/gtk_ctrl.c Tue Jul 22 04:40:55 2008 +0000
1.2 +++ b/src/gtkui/gtk_ctrl.c Wed Jul 23 11:10:49 2008 +0000
1.3 @@ -279,11 +279,11 @@
1.4 const struct maple_device_class **devices = maple_get_device_classes();
1.5
1.6 for( i=0; i< MAX_DEVICES; i++ ) {
1.7 - char buf[12];
1.8 + char buf[16];
1.9 GtkWidget *combo, *button;
1.10 int active = 0;
1.11 maple_device_t device = maple_get_device(i,0);
1.12 - sprintf( buf, _("Slot %d."), i );
1.13 + snprintf( buf, sizeof(buf), _("Slot %d."), i );
1.14 gtk_table_attach_defaults( GTK_TABLE(table), gtk_label_new(buf), 0, 1, i, i+1 );
1.15 combo = gtk_combo_box_new_text();
1.16 gtk_combo_box_append_text( GTK_COMBO_BOX(combo), _("<empty>") );
.