libpayload/PDcurses: avoid NULL deref
Change-Id: I86f1c97858fa3d007c4d4509fac3473c9e2ad2f2 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Found-by: Coverity Scan Reviewed-on: http://review.coreboot.org/7973 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
parent
dafa12adfc
commit
8180d1a22f
@ -86,14 +86,14 @@ int clrtoeol(void)
|
|||||||
|
|
||||||
int wclrtobot(WINDOW *win)
|
int wclrtobot(WINDOW *win)
|
||||||
{
|
{
|
||||||
int savey = win->_cury;
|
|
||||||
int savex = win->_curx;
|
|
||||||
|
|
||||||
PDC_LOG(("wclrtobot() - called\n"));
|
PDC_LOG(("wclrtobot() - called\n"));
|
||||||
|
|
||||||
if (!win)
|
if (!win)
|
||||||
return ERR;
|
return ERR;
|
||||||
|
|
||||||
|
int savey = win->_cury;
|
||||||
|
int savex = win->_curx;
|
||||||
|
|
||||||
/* should this involve scrolling region somehow ? */
|
/* should this involve scrolling region somehow ? */
|
||||||
|
|
||||||
if (win->_cury + 1 < win->_maxy)
|
if (win->_cury + 1 < win->_maxy)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user