diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-05 22:30:32 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-05 22:30:32 +0000 |
commit | cfc7b3276c6c8955a87109d158aebe5bf940f4dc (patch) | |
tree | 76fe931b48adfb5f86a305a639e77ec3008d4b34 /plugins/enttec | |
parent | 2251da0817206753fbe2053ecf4bee7bef118021 (diff) |
Rewrote some prohibited APIs in plugins/ (sprintf, strcpy, strcat).
svn path=/trunk/; revision=24274
Diffstat (limited to 'plugins/enttec')
-rw-r--r-- | plugins/enttec/packet-enttec.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/enttec/packet-enttec.c b/plugins/enttec/packet-enttec.c index 3291f97019..d8b3dc040f 100644 --- a/plugins/enttec/packet-enttec.c +++ b/plugins/enttec/packet-enttec.c @@ -290,21 +290,19 @@ dissect_enttec_dmx_data(tvbuff_t *tvb, guint offset, proto_tree *tree) for (r=0; r < row_count;r++) { for (c=0;(c < global_disp_col_count) && (((r*global_disp_col_count)+c) < ui);c++) { if ((c % (global_disp_col_count/2)) == 0) { - sprintf(ptr, " "); - ptr++; + ptr += g_snprintf(ptr, sizeof string - strlen(string), " "); } v = dmx_data[(r*global_disp_col_count)+c]; if (global_disp_chan_val_type == 0) { v = (v * 100) / 255; if (v == 100) { - sprintf(ptr, "FL "); + ptr += g_snprintf(ptr, sizeof string - strlen(string), "FL "); } else { - sprintf(ptr, chan_format[global_disp_chan_val_type], v); + ptr += g_snprintf(ptr, sizeof string - strlen(string), chan_format[global_disp_chan_val_type], v); } } else { - sprintf(ptr, chan_format[global_disp_chan_val_type], v); + ptr += g_snprintf(ptr, sizeof string - strlen(string), chan_format[global_disp_chan_val_type], v); } - ptr += strlen(ptr); } start_offset = dmx_data_offset[(r*global_disp_col_count)]; |