Lines 109-114
char *bigcrypt(const char *key, const char *salt)
Link Here
|
109 |
#else |
109 |
#else |
110 |
tmp_ptr = crypt(plaintext_ptr, salt); /* libc crypt() */ |
110 |
tmp_ptr = crypt(plaintext_ptr, salt); /* libc crypt() */ |
111 |
#endif |
111 |
#endif |
|
|
112 |
if (tmp_ptr == NULL) { |
113 |
free(dec_c2_cryptbuf); |
114 |
return NULL; |
115 |
} |
112 |
/* and place in the static area */ |
116 |
/* and place in the static area */ |
113 |
strncpy(cipher_ptr, tmp_ptr, 13); |
117 |
strncpy(cipher_ptr, tmp_ptr, 13); |
114 |
cipher_ptr += ESEGMENT_SIZE + SALT_SIZE; |
118 |
cipher_ptr += ESEGMENT_SIZE + SALT_SIZE; |
Lines 130-135
char *bigcrypt(const char *key, const char *salt)
Link Here
|
130 |
#else |
134 |
#else |
131 |
tmp_ptr = crypt(plaintext_ptr, salt_ptr); |
135 |
tmp_ptr = crypt(plaintext_ptr, salt_ptr); |
132 |
#endif |
136 |
#endif |
|
|
137 |
if (tmp_ptr == NULL) { |
138 |
_pam_overwrite(dec_c2_cryptbuf); |
139 |
free(dec_c2_cryptbuf); |
140 |
return NULL; |
141 |
} |
133 |
|
142 |
|
134 |
/* skip the salt for seg!=0 */ |
143 |
/* skip the salt for seg!=0 */ |
135 |
strncpy(cipher_ptr, (tmp_ptr + SALT_SIZE), ESEGMENT_SIZE); |
144 |
strncpy(cipher_ptr, (tmp_ptr + SALT_SIZE), ESEGMENT_SIZE); |
136 |
- |
|
|