aboutsummaryrefslogtreecommitdiff
path: root/lib/libtermcap
diff options
context:
space:
mode:
authorAndreas Schulz <ats@FreeBSD.org>1994-11-18 12:38:43 +0000
committerAndreas Schulz <ats@FreeBSD.org>1994-11-18 12:38:43 +0000
commit1e0b142e29fad0cdb3779072a9fb4adbc4c4a5a2 (patch)
tree64ef16e0ecbbcce52a219cd5ddf2a9f56f79b2a9 /lib/libtermcap
parent10c3815c460947c88d1865ef04b93c1dec378fd0 (diff)
downloadsrc-1e0b142e29fad0cdb3779072a9fb4adbc4c4a5a2.tar.gz
src-1e0b142e29fad0cdb3779072a9fb4adbc4c4a5a2.zip
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.
Notes
Notes: svn path=/head/; revision=4631
Diffstat (limited to 'lib/libtermcap')
-rw-r--r--lib/libtermcap/Makefile4
-rw-r--r--lib/libtermcap/termcap.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/libtermcap/Makefile b/lib/libtermcap/Makefile
index fbfa7f5c008c..4fef3a1f0dbe 100644
--- a/lib/libtermcap/Makefile
+++ b/lib/libtermcap/Makefile
@@ -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
diff --git a/lib/libtermcap/termcap.c b/lib/libtermcap/termcap.c
index 708ccfaa5d80..51f0288d580b 100644
--- a/lib/libtermcap/termcap.c
+++ b/lib/libtermcap/termcap.c
@@ -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;