diff options
author | Ezra Peisach <epeisach@mit.edu> | 2001-07-31 08:53:02 +0000 |
---|---|---|
committer | Ezra Peisach <epeisach@mit.edu> | 2001-07-31 08:53:02 +0000 |
commit | 01a4a3847b359a6c243ed33225f21aa382fde584 (patch) | |
tree | 9c118e93e6ddd226b2a5fd677ed49065f1de4a5f /src/lib/des425 | |
parent | c523dd38687ccd572694408b3e443abac8367b35 (diff) | |
download | krb5-01a4a3847b359a6c243ed33225f21aa382fde584.zip krb5-01a4a3847b359a6c243ed33225f21aa382fde584.tar.gz krb5-01a4a3847b359a6c243ed33225f21aa382fde584.tar.bz2 |
* read_passwd.c: Create local variable that takes the "int"
bufsize and makes it unsigned for use in malloc, strcmp, etc.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13660 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/des425')
-rw-r--r-- | src/lib/des425/ChangeLog | 5 | ||||
-rw-r--r-- | src/lib/des425/read_passwd.c | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/des425/ChangeLog b/src/lib/des425/ChangeLog index 6089b46..278b95f 100644 --- a/src/lib/des425/ChangeLog +++ b/src/lib/des425/ChangeLog @@ -1,3 +1,8 @@ +2001-07-31 Ezra Peisach <epeisach@mit.edu> + + * read_passwd.c: Create local variable that takes the "int" + bufsize and makes it unsigned for use in malloc, strcmp, etc. + 2001-07-19 Ken Raeburn <raeburn@mit.edu> * des.c (des_ecb_encrypt): Put "static" before "const" for local diff --git a/src/lib/des425/read_passwd.c b/src/lib/des425/read_passwd.c index 31bbd97..5862093 100644 --- a/src/lib/des425/read_passwd.c +++ b/src/lib/des425/read_passwd.c @@ -58,9 +58,9 @@ intr_routine(signo) /*** Routines ****************************************************** */ krb5_error_code -des_read_pw_string/*_v4_compat_crock*/(return_pwd, bufsize, prompt, prompt2) +des_read_pw_string/*_v4_compat_crock*/(return_pwd, bufsize_in, prompt, prompt2) char *return_pwd; - int bufsize; + int bufsize_in; char *prompt; char *prompt2; { @@ -69,6 +69,7 @@ des_read_pw_string/*_v4_compat_crock*/(return_pwd, bufsize, prompt, prompt2) int scratchchar; krb5_sigtype (*volatile ointrfunc)(); krb5_error_code errcode; + size_t bufsize = bufsize_in; #ifndef ECHO_PASSWORD struct termios echo_control, save_control; int fd; @@ -98,7 +99,7 @@ des_read_pw_string/*_v4_compat_crock*/(return_pwd, bufsize, prompt, prompt2) (void) fflush(stdout); (void) memset(return_pwd, 0, bufsize); - if (fgets(return_pwd, bufsize, stdin) == NULL) { + if (fgets(return_pwd, bufsize_in, stdin) == NULL) { (void) putchar('\n'); errcode = KRB5_LIBOS_CANTREADPWD; goto cleanup; @@ -124,7 +125,7 @@ des_read_pw_string/*_v4_compat_crock*/(return_pwd, bufsize, prompt, prompt2) goto cleanup; } (void) memset((char *)readin_string, 0, bufsize); - if (fgets((char *)readin_string, bufsize, stdin) == NULL) { + if (fgets((char *)readin_string, bufsize_in, stdin) == NULL) { (void) putchar('\n'); errcode = KRB5_LIBOS_CANTREADPWD; goto cleanup; |