aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-11-21 00:38:22 +0000
committerGuy Harris <guy@alum.mit.edu>2013-11-21 00:38:22 +0000
commit8b8cf5671d5eac2567f25e6d59ea9222759766bb (patch)
tree8c145dc7d81d05c9e9631b69fdf74b11413423ce /epan/dissectors/packet-dcerpc.c
parent1ee50439ca6c4f2a5b513756b5a118ad99006788 (diff)
strncpy() consideered unsafe (it doesn't, for example, guarantee that
the result is null-terminated); use g_strlcpy() (which *does* guarantee null termination) instead. svn path=/trunk/; revision=53461
Diffstat (limited to 'epan/dissectors/packet-dcerpc.c')
-rw-r--r--epan/dissectors/packet-dcerpc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c
index 4d81d512be..260c7f25bf 100644
--- a/epan/dissectors/packet-dcerpc.c
+++ b/epan/dissectors/packet-dcerpc.c
@@ -772,7 +772,7 @@ dcerpc_prompt(packet_info *pinfo, gchar* result)
g_string_append_printf(str, "&\r\nSMB FID: %u\r\n", dcerpc_get_transport_salt(pinfo));
g_string_append(str, "with:\r\n");
- strncpy(result, str->str, MAX_DECODE_AS_PROMPT_LEN);
+ g_strlcpy(result, str->str, MAX_DECODE_AS_PROMPT_LEN);
}
static gpointer