merge strcpy_truncate branch
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5027 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -203,9 +203,8 @@ crypt_md5(pw, salt)
|
||||
MD5Update(&ctx, pw+j, 1);
|
||||
|
||||
/* Now make the output string */
|
||||
strcpy(passwd,magic);
|
||||
strncat(passwd,sp,sl);
|
||||
strcat(passwd,"$");
|
||||
snprintf (passwd, sizeof(passwd),
|
||||
"%s%.*s$", magic, sl, sp);
|
||||
|
||||
MD5Final(final,&ctx);
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Kungliga Tekniska H<>gskolan
|
||||
* Copyright (c) 1995, 1996, 1997, 1998 Kungliga Tekniska H<>gskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -84,12 +84,12 @@ pwd_dialog(char *buf, int size)
|
||||
switch(DialogBox(hInst,MAKEINTRESOURCE(IDD_PASSWD_DIALOG),wnd,pwd_dialog_proc))
|
||||
{
|
||||
case IDOK:
|
||||
strcpy(buf,passwd);
|
||||
for(i=0; passwd[i] != '\0'; i++) passwd[i] = '\0';
|
||||
strcpy_truncate(buf, passwd, size);
|
||||
memset (passwd, 0, sizeof(passwd));
|
||||
return 0;
|
||||
case IDCANCEL:
|
||||
default:
|
||||
for(i=0; passwd[i] != '\0'; i++) passwd[i] = '\0';
|
||||
memset (passwd, 0, sizeof(passwd));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user