summaryrefslogtreecommitdiff
path: root/security/openssh-portable/files/patch-deattack.c
diff options
context:
space:
mode:
authorJacques Vidrine <nectar@FreeBSD.org>2003-09-17 16:07:48 +0000
committerJacques Vidrine <nectar@FreeBSD.org>2003-09-17 16:07:48 +0000
commit17f5a3c9fe04b53e16e5e42247e2cb8c0fb38d2f (patch)
tree33b79f1b18d452ba14981f3e0538e9720e2b8b90 /security/openssh-portable/files/patch-deattack.c
parent- Securitry Fix revision 2 (diff)
Add Solar Designer's additional fixes to buffer management.
Diffstat (limited to 'security/openssh-portable/files/patch-deattack.c')
-rw-r--r--security/openssh-portable/files/patch-deattack.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/security/openssh-portable/files/patch-deattack.c b/security/openssh-portable/files/patch-deattack.c
new file mode 100644
index 000000000000..987f1d2f959b
--- /dev/null
+++ b/security/openssh-portable/files/patch-deattack.c
@@ -0,0 +1,17 @@
+--- deattack.c Tue Mar 5 01:53:05 2002
++++ deattack.c Wed Sep 17 00:18:30 2003
+@@ -100,12 +100,12 @@ detect_attack(u_char *buf, u_int32_t len
+
+ 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);
+ }
+ }
+