Commit 2e6197d6 authored by Pavel Machek's avatar Pavel Machek
Browse files

Added password_strncpy() which pads destination with zeros.

parent 9c9e49ac
......@@ -38,3 +38,15 @@ get_best_password(struct password_item *head, int flags)
return best;
password_strncpy(char *to, char *from, int len)
int i;
for (i=0; i<len; i++) {
*to++ = *from;
if (*from)
......@@ -20,5 +20,7 @@ struct password_item {
extern struct password_item *last_password_item;
struct password_item *get_best_password(struct password_item *head, int flags);
extern void password_strncpy(char *to, char *from, int len);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment