mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-04 07:31:11 +00:00
Be more careful when doing el_parse() - only do it when el is
properly initialized, that happens when lpc is called from a tty. Without this change, it's possible to get SIGSEGV simply doing: echo "..:" | lpc Reported by: Wojciech A. Koszek <dunstan at freebsd czest pl> PR: 77462 (patch rewritten by myself) MFC After: 1 week
This commit is contained in:
parent
423ac68026
commit
c7cc259656
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=141947
|
@ -201,7 +201,7 @@ cmdscanner(void)
|
|||
makeargv();
|
||||
if (margc == 0)
|
||||
continue;
|
||||
if (el_parse(el, margc, margv) != -1)
|
||||
if (el!= NULL && el_parse(el, margc, margv) != -1)
|
||||
continue;
|
||||
|
||||
c = getcmd(margv[0]);
|
||||
|
|
Loading…
Reference in a new issue