summaryrefslogtreecommitdiff
path: root/deattack.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-09-23 18:59:08 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-09-23 18:59:08 +1000
commita05ec477b32c50aa793d865a231a3ec9d0ab1234 (patch)
treeed5a8892226f8dd4da673ece5422ecd15ba207a2 /deattack.c
parente1318fb07f775f2d54cacd98c217de9c25fbe964 (diff)
- markus@cvs.openbsd.org 2003/09/18 08:49:45
[deattack.c misc.c session.c ssh-agent.c] more buffer allocation fixes; from Solar Designer; CAN-2003-0682; ok millert@
Diffstat (limited to 'deattack.c')
-rw-r--r--deattack.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/deattack.c b/deattack.c
index 0442501e7..8b55d6686 100644
--- a/deattack.c
+++ b/deattack.c
@@ -18,7 +18,7 @@
18 */ 18 */
19 19
20#include "includes.h" 20#include "includes.h"
21RCSID("$OpenBSD: deattack.c,v 1.18 2002/03/04 17:27:39 stevesk Exp $"); 21RCSID("$OpenBSD: deattack.c,v 1.19 2003/09/18 08:49:45 markus Exp $");
22 22
23#include "deattack.h" 23#include "deattack.h"
24#include "log.h" 24#include "log.h"
@@ -100,12 +100,12 @@ detect_attack(u_char *buf, u_int32_t len, u_char *IV)
100 100
101 if (h == NULL) { 101 if (h == NULL) {
102 debug("Installing crc compensation attack detector."); 102 debug("Installing crc compensation attack detector.");
103 h = (u_int16_t *) xmalloc(l * HASH_ENTRYSIZE);
103 n = l; 104 n = l;
104 h = (u_int16_t *) xmalloc(n * HASH_ENTRYSIZE);
105 } else { 105 } else {
106 if (l > n) { 106 if (l > n) {
107 h = (u_int16_t *) xrealloc(h, l * HASH_ENTRYSIZE);
107 n = l; 108 n = l;
108 h = (u_int16_t *) xrealloc(h, n * HASH_ENTRYSIZE);
109 } 109 }
110 } 110 }
111 111