From b1437ec7c01a8bf79af21b8609754b6cff065156 Mon Sep 17 00:00:00 2001 From: "jiin.moon" Date: Tue, 20 Sep 2016 20:27:25 +0900 Subject: [PATCH] evas: Fix wrong access issue If bidi_props is NULL, do not access this point. @tizen_fix Change-Id: I8ded9b3c5baec1be2c9ce1a9feb28f780fee41df --- src/lib/evas/common/language/evas_bidi_utils.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/evas/common/language/evas_bidi_utils.c b/src/lib/evas/common/language/evas_bidi_utils.c index f04c825..6d28ee6 100644 --- a/src/lib/evas/common/language/evas_bidi_utils.c +++ b/src/lib/evas/common/language/evas_bidi_utils.c @@ -257,6 +257,11 @@ evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr, size_t len, #endif bidi_props = evas_bidi_paragraph_props_new(); + if (!bidi_props) /* TIZEN ONLY(20160920): In review on upstrem */ + { + len = -2; + goto cleanup; + } bidi_props->direction = base_bidi; /* Prep work for reordering */ @@ -562,6 +567,9 @@ evas_bidi_paragraph_props_new(void) { Evas_BiDi_Paragraph_Props *ret; ret = calloc(1, sizeof(Evas_BiDi_Paragraph_Props)); + /* TIZEN ONLY(20160920): In review on upstrem */ + if (!ret) return NULL; + ret->direction = EVAS_BIDI_PARAGRAPH_NEUTRAL; ret->refcount = 1; -- 2.7.4