diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-01 01:07:58 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-01 01:07:58 +0000 |
commit | 10a8f59e030c4b77535da29fcc02fdf4845bfa8c (patch) | |
tree | 8bc3214fd7240d0e5e52888279067e8a5faf47a3 /gtk/airpcap_gui_utils.c | |
parent | ee8b8b0ad7d7cb60f7e4bff8b382df8a93a664ef (diff) |
Rewrote some prohibited APIs in gtk/ (sprintf, strcpy, strcat).
If we get some truncated strings we probably overwrote some buffers...
svn path=/trunk/; revision=24239
Diffstat (limited to 'gtk/airpcap_gui_utils.c')
-rw-r--r-- | gtk/airpcap_gui_utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/airpcap_gui_utils.c b/gtk/airpcap_gui_utils.c index 07aaf409fb..881515ee05 100644 --- a/gtk/airpcap_gui_utils.c +++ b/gtk/airpcap_gui_utils.c @@ -739,9 +739,9 @@ airpcap_update_channel_offset_combo_entry(GtkWidget* w, gchar extChannel) gchar channel_offset_value[3]; if (extChannel > 0){ - sprintf(channel_offset_value, "+%d", extChannel); + g_snprintf(channel_offset_value, 3, "+%d", extChannel); }else{ - sprintf(channel_offset_value, "%d", extChannel); + g_snprintf(channel_offset_value, 3, "%d", extChannel); } gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(w)->entry), channel_offset_value); |