diff options
author | imp <imp@FreeBSD.org> | 1996-12-17 17:21:47 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1996-12-17 17:21:47 +0000 |
commit | aee5955ac4e49ed6c3594e020f734a61ff6727a7 (patch) | |
tree | feb0fe7fe9c02d582bc0a32943f22f6c19d55264 /usr.sbin/xntpd | |
parent | bc971b80bdb0b58d78465da3877576e5c12bb228 (diff) | |
download | FreeBSD-src-aee5955ac4e49ed6c3594e020f734a61ff6727a7.zip FreeBSD-src-aee5955ac4e49ed6c3594e020f734a61ff6727a7.tar.gz |
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 <Don.Lewis@tsc.tdk.com>
Closes PR: 2067
Diffstat (limited to 'usr.sbin/xntpd')
-rw-r--r-- | usr.sbin/xntpd/util/tickadj.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |