[04/13] ivi-shell: bugfix, SEVG by adding NULL check in ivi_layout_get_screen_resolution

Submitted by Nobuhiko Tanibata on June 22, 2015, 6:30 a.m.

Details

Message ID 1434954632-26681-1-git-send-email-nobuhiko_tanibata@xddp.denso.co.jp
State Accepted
Commit 0c217cb694ebf5a840f7b8cd026b466c6bd08425
Headers show

Not browsing as part of any series.

Commit Message

Nobuhiko Tanibata June 22, 2015, 6:30 a.m.
From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
---
 ivi-shell/ivi-layout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 7bc3aab..2cce2d3 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -1535,7 +1535,7 @@  ivi_layout_get_screen_resolution(struct ivi_layout_screen *iviscrn,
 {
 	struct weston_output *output = NULL;
 
-	if (pWidth == NULL || pHeight == NULL) {
+	if (iviscrn == NULL || pWidth == NULL || pHeight == NULL) {
 		weston_log("ivi_layout_get_screen_resolution: invalid argument\n");
 		return IVI_FAILED;
 	}