]> andersk Git - openssh.git/blobdiff - deattack.c
Merged OpenBSD CVS changes that go away
[openssh.git] / deattack.c
index 76e5613fea1055ae880bd54a91a1e09bbe510576..9bdbc3ec13fd1e63870e6447ec142e6c02ff317e 100644 (file)
@@ -100,9 +100,10 @@ detect_attack(unsigned char *buf, u_int32_t len, unsigned char *IV)
   register unsigned char *c;
   unsigned char  *d;
 
-
-  assert(len <= (SSH_MAXBLOCKS * SSH_BLOCKSIZE));
-  assert(len % SSH_BLOCKSIZE == 0);
+  if (len > (SSH_MAXBLOCKS * SSH_BLOCKSIZE) ||
+      len % SSH_BLOCKSIZE != 0) {
+    fatal("detect_attack: bad length %d", len);
+  }
 
   for (l = n; l < HASH_FACTOR(len / SSH_BLOCKSIZE); l = l << 2);
 
This page took 0.030847 seconds and 4 git commands to generate.