From aee5955ac4e49ed6c3594e020f734a61ff6727a7 Mon Sep 17 00:00:00 2001 From: imp Date: Tue, 17 Dec 1996 17:21:47 +0000 Subject: Apply patch in pr 2067 to correct an uninitialized pointer dereference in tickadj. Tested briefly here and it it seems to work. Possible 2.2 candidate. Submitted by: Don Lewis Closes PR: 2067 --- usr.sbin/xntpd/util/tickadj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.sbin/xntpd/util/tickadj.c') diff --git a/usr.sbin/xntpd/util/tickadj.c b/usr.sbin/xntpd/util/tickadj.c index 3a70b4f..d3781c5 100644 --- a/usr.sbin/xntpd/util/tickadj.c +++ b/usr.sbin/xntpd/util/tickadj.c @@ -339,7 +339,7 @@ getoffsets(filex, tick_off, tickadj_off, dosync_off, noprintf_off) unsigned long *dosync_off; unsigned long *noprintf_off; { - char **kname; + char **kname, *knm; #if defined(SYS_AUX3) || defined(SYS_AUX2) #define X_TICKADJ 0 @@ -446,6 +446,7 @@ getoffsets(filex, tick_off, tickadj_off, dosync_off, noprintf_off) #ifdef HAVE_GETBOOTFILE /* XXX bogus cast to avoid `const' poisoning. */ + kname = &knm; *kname = (char *)getbootfile(); if (stat(*kname, &stbuf) == -1 || nlist(*kname, nl) == -1) *kname = NULL; -- cgit v1.1