#12282: Fix strcmp() will NULL argument in termcap library
------------------------+---------------------------------------------------
Reporter: jdemeyer | Owner: tbd
Type: defect | Status: needs_review
Priority: blocker | Milestone: sage-4.8
Component: packages | Keywords: sd35.5
Work_issues: | Upstream: Not yet reported upstream; Will do
shortly.
Reviewer: | Author: Jeroen Demeyer
Merged: | Dependencies:
------------------------+---------------------------------------------------
Comment(by jdemeyer):
The fix in the spkg is
{{{
#!diff
diff -ru src/termcap.c src.fixed/termcap.c
--- src/termcap.c 2002-02-25 18:59:21.000000000 +0100
+++ src.fixed/termcap.c 2012-01-09 11:04:54.000000000 +0100
@@ -460,6 +460,7 @@
char *tcenv = NULL; /* TERMCAP value, if it contains :tc=. */
char *indirect = NULL; /* Terminal type in :tc= in TERMCAP value.
*/
int filep;
+ char *term_name;
#ifdef INTERNAL_TERMINAL
/* For the internal terminal we don't want to read any termcap file,
@@ -500,7 +501,8 @@
it is the entry itself, but only if
the name the caller requested matches the TERM variable. */
- if (termcap_name && !filep && !strcmp (name, getenv ("TERM")))
+ term_name = getenv("TERM");
+ if (termcap_name && !filep && term_name && !strcmp (name, term_name))
{
indirect = tgetst1 (find_capability (termcap_name, "tc"), (char **)
0);
if (!indirect)
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12282#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.