Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7973
-gerrit
commit 5e2ac8074714b62a2cd5a9fb5403f584bc1d5d04
Author: Patrick Georgi <patrick(a)georgi-clan.de>
Date: Mon Dec 29 19:57:14 2014 +0100
libpayload/PDcurses: avoid NULL deref
Change-Id: I86f1c97858fa3d007c4d4509fac3473c9e2ad2f2
Signed-off-by: Patrick Georgi <patrick(a)georgi-clan.de>
Found-by: Coverity Scan
---
payloads/libpayload/curses/PDCurses-3.4/pdcurses/clear.c | 6 +++---
1 file 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 0128df5..75426e2 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)
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7972
-gerrit
commit 25c07c4edf21deb5e0ae126b44284ed08c9e217d
Author: Patrick Georgi <patrick(a)georgi-clan.de>
Date: Mon Dec 29 19:53:51 2014 +0100
libpayload: fix printf handling of unsigned long long
1 << 63 is undefined for 32bit numbers.
Change-Id: I22f0e2486b133ea18cfbb8dd79fd4aed91ac0a4c
Signed-off-by: Patrick Georgi <patrick(a)georgi-clan.de>
Found-by: Coverity Scan
---
payloads/libpayload/libc/printf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/payloads/libpayload/libc/printf.c b/payloads/libpayload/libc/printf.c
index 8f76ccf..cb623aa 100644
--- a/payloads/libpayload/libc/printf.c
+++ b/payloads/libpayload/libc/printf.c
@@ -647,7 +647,7 @@ static int printf_core(const char *fmt, struct printf_spec *ps, va_list ap)
}
if (flags & __PRINTF_FLAG_SIGNED) {
- if (number & (0x1 << (size * 8 - 1))) {
+ if (number & (0x1ULL << (size * 8 - 1))) {
flags |= __PRINTF_FLAG_NEGATIVE;
if (size == sizeof(uint64_t)) {
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7970
-gerrit
commit 6e9f4accacd1ab3792dc602e642c049867f2a1a9
Author: Patrick Georgi <patrick(a)georgi-clan.de>
Date: Mon Dec 29 19:31:35 2014 +0100
libpayload: Add missing break statement
Change-Id: I073b9bd30f4f9b0cdf6c45c10e4549889342d5f3
Signed-off-by: Patrick Georgi <patrick(a)georgi-clan.de>
Found-by: Coverity Scan
---
payloads/libpayload/arch/x86/coreboot.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/payloads/libpayload/arch/x86/coreboot.c b/payloads/libpayload/arch/x86/coreboot.c
index 8ccd4cb..a463557 100644
--- a/payloads/libpayload/arch/x86/coreboot.c
+++ b/payloads/libpayload/arch/x86/coreboot.c
@@ -270,6 +270,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
#endif
case CB_TAG_MAINBOARD:
info->mainboard = (struct cb_mainboard *)ptr;
+ break;
#ifdef CONFIG_LP_CHROMEOS
case CB_TAG_GPIO:
cb_parse_gpios(ptr, info);
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7969
-gerrit
commit 4a685159b177716e763cd4ba3ef7589005aaa47a
Author: Patrick Georgi <patrick(a)georgi-clan.de>
Date: Mon Dec 29 19:30:37 2014 +0100
libpayload: Remove useless continue after return
Change-Id: I7209ceaf4ad686bbb07eb0c6105f77834d5511fd
Signed-off-by: Patrick Georgi <patrick(a)georgi-clan.de>
Found-by: Coverity Scan
---
payloads/libpayload/arch/x86/coreboot.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/payloads/libpayload/arch/x86/coreboot.c b/payloads/libpayload/arch/x86/coreboot.c
index 320b8c2..8ccd4cb 100644
--- a/payloads/libpayload/arch/x86/coreboot.c
+++ b/payloads/libpayload/arch/x86/coreboot.c
@@ -217,7 +217,6 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
case CB_TAG_FORWARD:
forward = phys_to_virt((void *)(unsigned long)((struct cb_forward *)rec)->forward);
return cb_parse_header(forward, len, info);
- continue;
case CB_TAG_MEMORY:
cb_parse_memory(ptr, info);
break;