summaryrefslogtreecommitdiffstats
path: root/deattack.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-09-22 21:04:23 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-09-22 21:04:23 +1000
commitfb16b2411eda857cd358dc4c9c63b66edc217a51 (patch)
treeb1959332991a29ddf752a6e4e9e29a80d139d41c /deattack.c
parentd1d41b318117258bd25f2eb2789ba3b91408bd16 (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 0442501e..8b55d668 100644
--- a/deattack.c
+++ b/deattack.c
@@ -18,7 +18,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: deattack.c,v 1.18 2002/03/04 17:27:39 stevesk Exp $");
+RCSID("$OpenBSD: deattack.c,v 1.19 2003/09/18 08:49:45 markus Exp $");
#include "deattack.h"
#include "log.h"
@@ -100,12 +100,12 @@ detect_attack(u_char *buf, u_int32_t len, u_char *IV)
if (h == NULL) {
debug("Installing crc compensation attack detector.");
+ h = (u_int16_t *) xmalloc(l * HASH_ENTRYSIZE);
n = l;
- h = (u_int16_t *) xmalloc(n * HASH_ENTRYSIZE);
} else {
if (l > n) {
+ h = (u_int16_t *) xrealloc(h, l * HASH_ENTRYSIZE);
n = l;
- h = (u_int16_t *) xrealloc(h, n * HASH_ENTRYSIZE);
}
}