From 7bbacc6165f4f5ed2f77610b72f0aff67068077d Mon Sep 17 00:00:00 2001 From: Nobuhiko Tanibata Date: Mon, 22 Jun 2015 15:30:09 +0900 Subject: [PATCH] ivi-shell: bugfix, check limitation of ivi_layout_layer opacity Signed-off-by: Nobuhiko Tanibata Acked-by: Pekka Paalanen --- ivi-shell/ivi-layout.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index 50ce22fd..88629ad3 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -1951,7 +1951,9 @@ ivi_layout_layer_set_opacity(struct ivi_layout_layer *ivilayer, { struct ivi_layout_layer_properties *prop = NULL; - if (ivilayer == NULL) { + if (ivilayer == NULL || + opacity < wl_fixed_from_double(0.0) || + wl_fixed_from_double(1.0) < opacity) { weston_log("ivi_layout_layer_set_opacity: invalid argument\n"); return IVI_FAILED; }