Bug 97

Summary: deattack.c modifications for correct UNICOS behavior
Product: Portable OpenSSH Reporter: wendy palm <wendyp>
Component: sshdAssignee: OpenSSH Bugzilla mailing list <openssh-bugs>
Status: CLOSED INVALID    
Severity: normal    
Priority: P2    
Version: -current   
Hardware: Other   
OS: Other   

Description wendy palm 2002-02-05 06:16:20 AEDT
--- deattack.c.orig     Mon Feb  4 12:32:51 2002
+++ deattack.c  Mon Feb  4 12:35:01 2002
@@ -101,11 +101,19 @@
        if (h == NULL) {
                debug("Installing crc compensation attack detector.");
                n = l;
+#ifdef _CRAY
+               h = (u_int16_t *) xmalloc(n * sizeof(u_int16_t));
+#else
                h = (u_int16_t *) xmalloc(n * HASH_ENTRYSIZE);
+#endif /* _CRAY */
        } else {
                if (l > n) {
                        n = l;
+#ifdef _CRAY
+                       h = (u_int16_t *) xrealloc(h, n * sizeof(u_int16_t));
+#else
                        h = (u_int16_t *) xrealloc(h, n * HASH_ENTRYSIZE);
+#endif /* _CRAY */
                }
        }

@@ -128,7 +136,11 @@
                }
                return (DEATTACK_OK);
        }
+#ifdef _CRAY
+       for (i=0; i<n; i++) h[i] = HASH_UNUSED;
+#else
        memset(h, HASH_UNUSEDCHAR, n * HASH_ENTRYSIZE);
+#endif /* _CRAY */

        if (IV)
                h[HASH(IV) & (n - 1)] = HASH_IV;
Comment 1 wendy palm 2002-04-23 08:39:38 AEST
these patches are no longer required.
Comment 2 Damien Miller 2004-04-14 12:24:17 AEST
Mass change of RESOLVED bugs to CLOSED