patch-auth2-jpake_c 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. --- openssh-5.2p1.orig/auth2-jpake.c 2008-11-11 06:33:03.000000000 +0100
  2. +++ openssh-5.2p1/auth2-jpake.c 2009-09-18 12:28:10.000000000 +0200
  3. @@ -172,7 +172,7 @@ derive_rawsalt(const char *username, u_c
  4. fatal("%s: not enough bytes for rawsalt (want %u have %u)",
  5. __func__, len, digest_len);
  6. memcpy(rawsalt, digest, len);
  7. - bzero(digest, digest_len);
  8. + memset(digest, 0, digest_len);
  9. xfree(digest);
  10. }
  11. @@ -197,10 +197,10 @@ makesalt(u_int want, const char *user)
  12. fatal("%s: want %u", __func__, want);
  13. derive_rawsalt(user, rawsalt, sizeof(rawsalt));
  14. - bzero(ret, sizeof(ret));
  15. + memset(ret, 0, sizeof(ret));
  16. for (i = 0; i < want; i++)
  17. ret[i] = pw_encode64(rawsalt[i]);
  18. - bzero(rawsalt, sizeof(rawsalt));
  19. + memset(rawsalt, 0, sizeof(rawsalt));
  20. return ret;
  21. }
  22. @@ -354,7 +354,7 @@ auth2_jpake_get_pwdata(Authctxt *authctx
  23. debug3("%s: scheme = %s", __func__, *hash_scheme);
  24. JPAKE_DEBUG_BN((*s, "%s: s = ", __func__));
  25. #endif
  26. - bzero(secret, secret_len);
  27. + memset(secret, 0, secret_len);
  28. xfree(secret);
  29. }
  30. @@ -395,12 +395,12 @@ auth2_jpake_start(Authctxt *authctxt)
  31. packet_send();
  32. packet_write_wait();
  33. - bzero(hash_scheme, strlen(hash_scheme));
  34. - bzero(salt, strlen(salt));
  35. + memset(hash_scheme, 0, strlen(hash_scheme));
  36. + memset(salt, 0, strlen(salt));
  37. xfree(hash_scheme);
  38. xfree(salt);
  39. - bzero(x3_proof, x3_proof_len);
  40. - bzero(x4_proof, x4_proof_len);
  41. + memset(x3_proof, 0, x3_proof_len);
  42. + memset(x4_proof, 0, x4_proof_len);
  43. xfree(x3_proof);
  44. xfree(x4_proof);
  45. @@ -447,8 +447,8 @@ input_userauth_jpake_client_step1(int ty
  46. &pctx->b,
  47. &x4_s_proof, &x4_s_proof_len));
  48. - bzero(x1_proof, x1_proof_len);
  49. - bzero(x2_proof, x2_proof_len);
  50. + memset(x1_proof, 0, x1_proof_len);
  51. + memset(x2_proof, 0, x2_proof_len);
  52. xfree(x1_proof);
  53. xfree(x2_proof);
  54. @@ -462,7 +462,7 @@ input_userauth_jpake_client_step1(int ty
  55. packet_send();
  56. packet_write_wait();
  57. - bzero(x4_s_proof, x4_s_proof_len);
  58. + memset(x4_s_proof, 0, x4_s_proof_len);
  59. xfree(x4_s_proof);
  60. /* Expect step 2 packet from peer */
  61. @@ -503,7 +503,7 @@ input_userauth_jpake_client_step2(int ty
  62. &pctx->k,
  63. &pctx->h_k_sid_sessid, &pctx->h_k_sid_sessid_len));
  64. - bzero(x2_s_proof, x2_s_proof_len);
  65. + memset(x2_s_proof, 0, x2_s_proof_len);
  66. xfree(x2_s_proof);
  67. if (!use_privsep)