diff options
author | Darren Tucker <dtucker@zip.com.au> | 2003-09-22 21:04:23 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2003-09-22 21:04:23 +1000 |
commit | fb16b2411eda857cd358dc4c9c63b66edc217a51 (patch) | |
tree | b1959332991a29ddf752a6e4e9e29a80d139d41c /deattack.c | |
parent | d1d41b318117258bd25f2eb2789ba3b91408bd16 (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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); } } |