aboutsummaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2008-02-03 15:38:20 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2008-02-03 15:38:20 +0000
commit47d744b59da83744623bea39c006eb7e2ec02de9 (patch)
tree17d9ec1526a37c793ee3d7cbd031091d1867dd7f /print.c
parente59b5d6b8a963263b0c2dcf163e07b4318737d71 (diff)
More rewrite of prohibited APIs (sprintf, strcpy, strcat).
svn path=/trunk/; revision=24258
Diffstat (limited to 'print.c')
-rw-r--r--print.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/print.c b/print.c
index 1272dfb5fb..fc5df6c766 100644
--- a/print.c
+++ b/print.c
@@ -718,9 +718,7 @@ print_hex_data(print_stream_t *stream, epan_dissect_t *edt)
if (multiple_sources) {
name = src->name;
print_line(stream, 0, "");
- line = g_malloc(strlen(name) + 2); /* <name>:\0 */
- strcpy(line, name);
- strcat(line, ":");
+ line = g_strdup_printf("%s:", name);
print_line(stream, 0, line);
g_free(line);
}