]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/chap_ms.c
radius plugin: add fclose operation to fix file pointer not closed after use (#401)
[ppp.git] / pppd / chap_ms.c
index c34b6aa5c7199bab245b0009e5148ea9770c8393..6b2a0261c2c8141e01912419b77cd153b01ddad0 100644 (file)
@@ -509,7 +509,7 @@ ChallengeResponse(u_char *challenge,
                  u_char *PasswordHash,
                  u_char *response)
 {
-    u_char ZPasswordHash[21];
+    u_char ZPasswordHash[24];
     PPP_CIPHER_CTX *ctx;
 
     BZERO(ZPasswordHash, sizeof(ZPasswordHash));
@@ -686,7 +686,7 @@ GenerateAuthenticatorResponse(unsigned char* PasswordHashHash,
 
     int                i;
     PPP_MD_CTX *ctx;
-    u_char     Digest[SHA_DIGEST_LENGTH];
+    u_char     Digest[SHA_DIGEST_LENGTH] = {};
     int     hash_len;
     u_char     Challenge[8];