1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
--- openssh-5.2p1.orig/jpake.c 2008-11-05 06:20:46.000000000 +0100
+++ openssh-5.2p1/jpake.c 2009-09-18 12:26:24.000000000 +0200
@@ -160,7 +160,7 @@ hash_buffer(const u_char *buf, u_int len
success = 0;
out:
EVP_MD_CTX_cleanup(&evp_md_ctx);
- bzero(digest, sizeof(digest));
+ memset(digest, 0, sizeof(digest));
digest_len = 0;
return success;
}
@@ -259,7 +259,7 @@ jpake_free(struct jpake_ctx *pctx)
#define JPAKE_BUF_CLEAR_FREE(v, l) \
do { \
if ((v) != NULL) { \
- bzero((v), (l)); \
+ memset((v), 0, (l)); \
xfree(v); \
(v) = NULL; \
(l) = 0; \
@@ -287,7 +287,7 @@ jpake_free(struct jpake_ctx *pctx)
#undef JPAKE_BN_CLEAR_FREE
#undef JPAKE_BUF_CLEAR_FREE
- bzero(pctx, sizeof(pctx));
+ memset(pctx, 0, sizeof(pctx));
xfree(pctx);
}
@@ -592,7 +592,7 @@ jpake_check_confirm(const BIGNUM *k,
else if (memcmp(peer_confirm_hash, expected_confirm_hash,
expected_confirm_hash_len) == 0)
success = 1;
- bzero(expected_confirm_hash, expected_confirm_hash_len);
+ memset(expected_confirm_hash, 0, expected_confirm_hash_len);
xfree(expected_confirm_hash);
debug3("%s: success = %d", __func__, success);
return success;
|