patch-src_aircrack-ptw-lib_c 857 B

123456789101112131415161718192021
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- aircrack-ng-1.0-rc3.orig/src/aircrack-ptw-lib.c 2009-03-26 22:01:02.000000000 +0100
  3. +++ aircrack-ng-1.0-rc3/src/aircrack-ptw-lib.c 2009-05-01 15:52:04.000000000 +0200
  4. @@ -454,7 +454,7 @@ int PTW_computeKey(PTW_attackstate * sta
  5. {
  6. // Try the original klein attack first
  7. for (i = 0; i < keylen; i++) {
  8. - bzero(&table[i][0], sizeof(PTW_tableentry) * n);
  9. + memset(&table[i][0], 0, sizeof(PTW_tableentry) * n);
  10. for (j = 0; j < n; j++) {
  11. table[i][j].b = j;
  12. }
  13. @@ -602,7 +602,7 @@ PTW_attackstate * PTW_newattackstate() {
  14. if (state == NULL) {
  15. return NULL;
  16. }
  17. - bzero(state, sizeof(PTW_attackstate));
  18. + memset(state, 0, sizeof(PTW_attackstate));
  19. for (i = 0; i < PTW_KEYHSBYTES; i++) {
  20. for (k = 0; k < n; k++) {
  21. state->table[i][k].b = k;