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
This commit is contained in:
Warner Losh 1996-12-17 17:21:47 +00:00
parent 18b7704795
commit d07d447b29
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=20597

View File

@ -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;