summaryrefslogtreecommitdiff
path: root/payloads/libpayload/curses
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2014-12-29 19:57:14 +0100
committerPatrick Georgi <pgeorgi@google.com>2015-01-03 23:58:22 +0100
commit8180d1a22f54f2a792c9187d98d15b2501d35aa7 (patch)
tree7c87a10edb75ff2c99fa048b2b0eefd9e54da1bf /payloads/libpayload/curses
parentdafa12adfc567e71df83a2f5924f51a595db963c (diff)
downloadcoreboot-8180d1a22f54f2a792c9187d98d15b2501d35aa7.tar.xz
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>
Diffstat (limited to 'payloads/libpayload/curses')
-rw-r--r--payloads/libpayload/curses/PDCurses-3.4/pdcurses/clear.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/payloads/libpayload/curses/PDCurses-3.4/pdcurses/clear.c b/payloads/libpayload/curses/PDCurses-3.4/pdcurses/clear.c
index 0128df5cb8..75426e2728 100644
--- a/payloads/libpayload/curses/PDCurses-3.4/pdcurses/clear.c
+++ b/payloads/libpayload/curses/PDCurses-3.4/pdcurses/clear.c
@@ -86,14 +86,14 @@ int clrtoeol(void)
int wclrtobot(WINDOW *win)
{
- int savey = win->_cury;
- int savex = win->_curx;
-
PDC_LOG(("wclrtobot() - called\n"));
if (!win)
return ERR;
+ int savey = win->_cury;
+ int savex = win->_curx;
+
/* should this involve scrolling region somehow ? */
if (win->_cury + 1 < win->_maxy)