svn rev #22783: trunk/src/kadmin/cli/
ghudson@MIT.EDU
ghudson at MIT.EDU
Tue Sep 22 12:46:07 EDT 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=22783
Commit By: ghudson
Log Message:
Fix a braino in r22782: we don't use strcpy even safely; use strlcpy
instead.
Changed Files:
U trunk/src/kadmin/cli/kadmin.c
Modified: trunk/src/kadmin/cli/kadmin.c
===================================================================
--- trunk/src/kadmin/cli/kadmin.c 2009-09-21 18:40:02 UTC (rev 22782)
+++ trunk/src/kadmin/cli/kadmin.c 2009-09-22 16:46:06 UTC (rev 22783)
@@ -1174,7 +1174,7 @@
size_t i;
/* Must try to pass any password policy in place, and be valid UTF-8. */
- strcpy(buf, "6F a[");
+ strlcpy(buf, "6F a[", sz);
for (i = strlen(buf); i < sz - 1; i++)
buf[i] = 'a' + (i % 26);
buf[sz - 1] = '\0';
More information about the cvs-krb5
mailing list