diff options
author | ruengeler <ruengeler@wireshark.org> | 2015-12-03 13:47:33 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-12-07 07:14:57 +0000 |
commit | d8bbd232cdd910e70ce15f9a11d0986b6a5c4621 (patch) | |
tree | 41f2a1d31e2da6ab1990af5f2f30e9b5f619c921 /ui/gtk/sctp_byte_graph_dlg.c | |
parent | 9a9b1c9bbaba1e23a17b6a3f06afac7116c6a82b (diff) | |
download | wireshark-d8bbd232cdd910e70ce15f9a11d0986b6a5c4621.tar.gz |
SCTP: Fix warning found by PVS Studio
Change-Id: I713eb6eff3681573baf77274847a32a4cc6b9ee0
Reviewed-on: https://code.wireshark.org/review/12408
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/gtk/sctp_byte_graph_dlg.c')
-rw-r--r-- | ui/gtk/sctp_byte_graph_dlg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/gtk/sctp_byte_graph_dlg.c b/ui/gtk/sctp_byte_graph_dlg.c index 4b1815497c..c55c1f14a4 100644 --- a/ui/gtk/sctp_byte_graph_dlg.c +++ b/ui/gtk/sctp_byte_graph_dlg.c @@ -1017,8 +1017,8 @@ on_button_release_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer GtkAllocation widget_alloc; cairo_t *cr; - g_snprintf(label_string, 15, "%d", 0); - memcpy(label_string,(gchar *)g_locale_to_utf8(label_string, -1 , NULL, NULL, NULL), 15); + g_snprintf(label_string, sizeof(label_string), "%d", 0); + memcpy(label_string,(gchar *)g_locale_to_utf8(label_string, -1 , NULL, NULL, NULL), sizeof(label_string)); layout = gtk_widget_create_pango_layout(u_data->io->draw_area, label_string); pango_layout_get_pixel_size(layout, &label_width, &label_height); @@ -1197,7 +1197,7 @@ on_button_release_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer else position = event->x + 5; - memcpy(label_string,(gchar *)g_locale_to_utf8(label_string, -1 , NULL, NULL, NULL), 15); + memcpy(label_string,(gchar *)g_locale_to_utf8(label_string, -1 , NULL, NULL, NULL), sizeof(label_string)); pango_layout_set_text(layout, label_string, -1); pango_layout_get_pixel_size(layout, &lwidth, NULL); |