summaryrefslogtreecommitdiff
path: root/ext/mime_magic
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-12-28 20:45:27 +0000
committerAntony Dovgal <tony2001@php.net>2006-12-28 20:45:27 +0000
commite5f95ec3e4dfaab75be9537feae226ef33e021a6 (patch)
treece34e1693b2113709b603c58269252e99401390b /ext/mime_magic
parent559ab4b3f9b3055daffd4e50bbee6a5b2405707a (diff)
downloadphp-git-e5f95ec3e4dfaab75be9537feae226ef33e021a6.tar.gz
MFH
Diffstat (limited to 'ext/mime_magic')
-rw-r--r--ext/mime_magic/mime_magic.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/mime_magic/mime_magic.c b/ext/mime_magic/mime_magic.c
index c4a4ebaf24..7760efe094 100644
--- a/ext/mime_magic/mime_magic.c
+++ b/ext/mime_magic/mime_magic.c
@@ -730,9 +730,7 @@ static int parse(char *l, int lineno)
return -1;
}
- strncpy(m->desc, l, sizeof(m->desc) - 1);
- m->desc[sizeof(m->desc) - 1] = '\0';
-
+ strlcpy(m->desc, l, sizeof(m->desc));
return 0;
}