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/flow_graph.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/flow_graph.c')
-rw-r--r-- | gtk/flow_graph.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/flow_graph.c b/gtk/flow_graph.c index eb82e8660f..8728a77d36 100644 --- a/gtk/flow_graph.c +++ b/gtk/flow_graph.c @@ -348,10 +348,10 @@ static int flow_graph_tcp_add_to_graph(packet_info *pinfo, const struct tcpheade bpos = 1 << i; if (tcph->th_flags & bpos) { if (fpos) { - strcpy(&flags[fpos], ", "); + strncpy(&flags[fpos], ", ", 64 - fpos - 1); fpos += 2; } - strcpy(&flags[fpos], fstr[i]); + strncpy(&flags[fpos], fstr[i], 64 - fpos - 1); fpos += 3; } } |