]> andersk Git - openssh.git/blobdiff - deattack.c
fix spacing of include
[openssh.git] / deattack.c
index 12849a32dc84f94ec110a4f8d3e49113ac44446e..0cf1e1c54f1c624fed18e3ee372c7f149670ea77 100644 (file)
@@ -1,5 +1,3 @@
-/*     $OpenBSD: deattack.c,v 1.17 2001/12/19 07:18:56 deraadt Exp $   */
-
 /*
  * Cryptographic attack detector for ssh - source code
  *
  */
 
 #include "includes.h"
+RCSID("$OpenBSD: deattack.c,v 1.20 2006/02/07 03:59:20 stevesk Exp $");
+
 #include "deattack.h"
 #include "log.h"
 #include "crc32.h"
 #include "getput.h"
 #include "xmalloc.h"
-#include "deattack.h"
 
 /* SSH Constants */
 #define SSH_MAXBLOCKS  (32 * 1024)
@@ -100,12 +99,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);
                }
        }
 
This page took 0.081941 seconds and 4 git commands to generate.