[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
user/3104: Propolice katch kauth. (Patches and testcase).
- To: bugs_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org
- Subject: user/3104: Propolice katch kauth. (Patches and testcase).
- From: Jan Johansson <janj+openbsd_(_at_)_wenf_(_dot_)_org>
- Date: Fri, 28 Feb 2003 09:12:42 -0700 (MST)
- Cc:
- Reply-to: Jan Johansson <janj+openbsd_(_at_)_wenf_(_dot_)_org>
The following reply was made to PR user/3104; it has been noted by GNATS.
From: Jan Johansson <janj+openbsd_(_at_)_wenf_(_dot_)_org>
To: bugs_(_at_)_openbsd_(_dot_)_org
Cc:
Subject: user/3104: Propolice katch kauth. (Patches and testcase).
Date: Fri, 28 Feb 2003 00:24:03 +0100
On i386 it works because the heap is dirty, on sparc64 it
dosen't work because the heap is clean and loop goes on
forever.
Patch to fix this.
--- kerberosV/src/lib/roken/resolve.c.orig Fri Feb 28 00:17:59 2003
+++ kerberosV/src/lib/roken/resolve.c Thu Feb 27 23:18:54 2003
@@ -453,7 +453,7 @@
headp = &(*tt)->next;
sum -= (*tt)->u.srv->weight;
*tt = NULL;
- while(*ss == NULL)
+ while(ss < ee && *ss == NULL)
ss++;
}
}
This fixes the test case on i386, and reveals another bug on
sparc64.
Testcase:
#include <stdlib.h>
/* Fixed in NetBSD */
/* /usr/src/lib/libc/stdlib/random.c:1.20 */
int
main(int argc, char **argv)
{
int len = atoi(argv[1]);
char *foo = malloc(len);
char *oldfoo;
oldfoo = initstate(time(NULL), foo, len);
return 0;
}
Credits go to lha_(_at_)_stacken_(_dot_)_kth_(_dot_)_se, mho_(_at_)_mho_(_dot_)_nu and art_(_at_)__(_dot_)_
Visit your host, monkey.org