summaryrefslogtreecommitdiffstats
path: root/modules/metadata/mod_mime_magic.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/metadata/mod_mime_magic.c')
-rw-r--r--modules/metadata/mod_mime_magic.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/metadata/mod_mime_magic.c b/modules/metadata/mod_mime_magic.c
index fde91cadff..f9ef86f7ce 100644
--- a/modules/metadata/mod_mime_magic.c
+++ b/modules/metadata/mod_mime_magic.c
@@ -1275,8 +1275,7 @@ static int parse(server_rec *serv, apr_pool_t *p, char *l, int lineno)
}
else
m->nospflag = 0;
- strncpy(m->desc, l, sizeof(m->desc) - 1);
- m->desc[sizeof(m->desc) - 1] = '\0';
+ apr_cpystrn(m->desc, l, sizeof(m->desc));
#if MIME_MAGIC_DEBUG
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, serv,