tony2001 Thu Dec 28 20:45:20 2006 UTC
Modified files:
/php-src/ext/mime_magic mime_magic.c
Log:
use strlcpy()
http://cvs.php.net/viewvc.cgi/php-src/ext/mime_magic/mime_magic.c?r1=1.52&r2=1.53&diff_format=u
Index: php-src/ext/mime_magic/mime_magic.c
diff -u php-src/ext/mime_magic/mime_magic.c:1.52
php-src/ext/mime_magic/mime_magic.c:1.53
--- php-src/ext/mime_magic/mime_magic.c:1.52 Thu Nov 30 15:13:33 2006
+++ php-src/ext/mime_magic/mime_magic.c Thu Dec 28 20:45:20 2006
@@ -15,7 +15,7 @@
| Author: Hartmut Holzgraefe <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $Id: mime_magic.c,v 1.52 2006/11/30 15:13:33 iliaa Exp $
+ $Id: mime_magic.c,v 1.53 2006/12/28 20:45:20 tony2001 Exp $
This module contains a lot of stuff taken from Apache mod_mime_magic,
so the license section is a little bit longer than usual:
@@ -730,9 +730,7 @@
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;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php