diff options
author | Glenn L McGrath | 2003-05-26 14:07:50 +0000 |
---|---|---|
committer | Glenn L McGrath | 2003-05-26 14:07:50 +0000 |
commit | 393183dccc4d100366972bdbbdc6e03a77839120 (patch) | |
tree | d2e94dac0f1f5da5cb3ecb927b78c4c2a02f4ea6 /libbb/pw_encrypt.c | |
parent | ddfe18df75c15be4a2aadddb241c3b86b1e2968a (diff) | |
download | busybox-393183dccc4d100366972bdbbdc6e03a77839120.zip busybox-393183dccc4d100366972bdbbdc6e03a77839120.tar.gz |
Vodz, last_patch_86
Diffstat (limited to 'libbb/pw_encrypt.c')
-rw-r--r-- | libbb/pw_encrypt.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libbb/pw_encrypt.c b/libbb/pw_encrypt.c index 0e4eb9f..ac79f83 100644 --- a/libbb/pw_encrypt.c +++ b/libbb/pw_encrypt.c @@ -39,10 +39,7 @@ extern char *pw_encrypt(const char *clear, const char *salt) /* if crypt (a nonstandard crypt) returns a string too large, truncate it so we don't overrun buffers and hope there is enough security in what's left */ - if (strlen(cp) > sizeof(cipher)-1) { - cp[sizeof(cipher)-1] = 0; - } - strcpy(cipher, cp); + safe_strncpy(cipher, cp, sizeof(cipher)); return cipher; } |