Shigeharu Isoda
2013-05-19 06:56:12 UTC
Hello, Alexander.
I've recently begun to use lftp, it works great!
But I found lftp ignores getenv() return value, this causes
segmentation fault, while lftp invoked on no 'TERM' environment
variable, such as cron job.
Here is a simple patch.
Thank you!
*** src/lftp_tinfo.cc Sun May 19 14:10:47 2013
--- src/lftp_tinfo.cc.orig Tue Mar 19 21:56:07 2013
***************
*** 54,60 ****
terminfo_ok = false;
#elif defined(HAVE_TGETSTR)
static char buf[2048];
! if(getenv("TERM")==NULL||tgetent(buf,getenv("TERM")) == -1)
terminfo_ok = false;
#endif
}
--- 54,60 ----
terminfo_ok = false;
#elif defined(HAVE_TGETSTR)
static char buf[2048];
! if(tgetent(buf,getenv("TERM")) == -1)
terminfo_ok = false;
#endif
}
--
Shigeharu Isoda s-***@ricelabo.com
I've recently begun to use lftp, it works great!
But I found lftp ignores getenv() return value, this causes
segmentation fault, while lftp invoked on no 'TERM' environment
variable, such as cron job.
Here is a simple patch.
Thank you!
*** src/lftp_tinfo.cc Sun May 19 14:10:47 2013
--- src/lftp_tinfo.cc.orig Tue Mar 19 21:56:07 2013
***************
*** 54,60 ****
terminfo_ok = false;
#elif defined(HAVE_TGETSTR)
static char buf[2048];
! if(getenv("TERM")==NULL||tgetent(buf,getenv("TERM")) == -1)
terminfo_ok = false;
#endif
}
--- 54,60 ----
terminfo_ok = false;
#elif defined(HAVE_TGETSTR)
static char buf[2048];
! if(tgetent(buf,getenv("TERM")) == -1)
terminfo_ok = false;
#endif
}
--
Shigeharu Isoda s-***@ricelabo.com