diff options
author | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2011-03-28 17:04:58 +0000 |
---|---|---|
committer | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2011-03-28 17:04:58 +0000 |
commit | 10928bc0cc9be6435bd70bc6708c5905c22cba78 (patch) | |
tree | 1dc5258e4ad907f06a7af8d883443d3cbe676338 /plugins | |
parent | 15503bf4aafa54ec41619269eb418a8ec2f9897d (diff) |
Don't use prohibited strncpy(). Use g_strlcpy() instead. Ensures that "orig"
will be NULL-terminated, even if len >= SCS_HUGE_SIZE.
svn path=/trunk/; revision=36383
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mate/mate_util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mate/mate_util.c b/plugins/mate/mate_util.c index 7f074e7471..a9a43b303c 100644 --- a/plugins/mate/mate_util.c +++ b/plugins/mate/mate_util.c @@ -173,11 +173,11 @@ gchar* scs_subscribe(SCS_collection* c, const gchar* s) { } else { chunk = c->mate_huge; len = SCS_HUGE_SIZE; - g_warning("mate SCS: string truncated to huge size"); + g_warning("mate SCS: string truncated due to huge size"); } orig = g_mem_chunk_alloc(chunk); - strncpy(orig,s,len); + g_strlcpy(orig,s,len); g_hash_table_insert(c->hash,orig,ip); } |