don't use sizeof(pointer)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14925 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -107,7 +107,7 @@ char_class_passwd_quality (krb5_context context,
|
|||||||
len = pwd->length + 1;
|
len = pwd->length + 1;
|
||||||
pw = malloc(len);
|
pw = malloc(len);
|
||||||
if (pw == NULL) {
|
if (pw == NULL) {
|
||||||
strlcpy(message, "out of memory", sizeof(message));
|
strlcpy(message, "out of memory", length);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
strlcpy(pw, pwd->data, len);
|
strlcpy(pw, pwd->data, len);
|
||||||
@@ -166,7 +166,7 @@ external_passwd_quality (krb5_context context,
|
|||||||
|
|
||||||
ret = krb5_unparse_name(context, principal, &p);
|
ret = krb5_unparse_name(context, principal, &p);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
strlcpy(message, "out of memory", sizeof(message));
|
strlcpy(message, "out of memory", length);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user