Makefile:

Change the reference for the libtermcap libtermlib link from SHLIBDIR
to LIBDIR. SHLIBDIR is undefined in the standard case.
termcap.c:
Initialize a local variable to zero. Otherwise an erroneous free call
can happen and clobber the calling program.
Seen with vi and gdb. If you have TERMCAP set with a terminal entry and
set TERM with something like huhu, vi and gdb core dumps.
This commit is contained in:
Andreas Schulz 1994-11-18 12:38:43 +00:00
parent 10c3815c46
commit 1e0b142e29
2 changed files with 3 additions and 2 deletions

View File

@ -9,8 +9,8 @@ MLINKS= termcap.3 tgetent.3 termcap.3 tgetflag.3 termcap.3 tgetnum.3 \
termcap.3 tgetstr.3 termcap.3 tgoto.3 termcap.3 tputs.3
LINKS= ${LIBDIR}/libtermcap.a ${LIBDIR}/libtermlib.a
.if !defined(NOPIC)
LINKS+= ${SHLIBDIR}/libtermcap.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
${SHLIBDIR}/libtermlib.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
LINKS+= ${LIBDIR}/libtermcap.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
${LIBDIR}/libtermlib.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
.endif
.if !defined(NOPROFILE)
LINKS+= ${LIBDIR}/libtermcap_p.a ${LIBDIR}/libtermlib_p.a

View File

@ -78,6 +78,7 @@ tgetent(bp, name)
char **pvec; /* holds usable tail of path vector */
char *termpath;
dummy = NULL;
fname = pathvec;
pvec = pathvec;
tbuf = bp;