From: jiin.moon Date: Tue, 20 Sep 2016 11:27:25 +0000 (+0900) Subject: evas: Fix wrong access issue X-Git-Tag: accepted/tizen/common/20160921.162828~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1437ec7c01a8bf79af21b8609754b6cff065156;p=platform%2Fupstream%2Fefl.git evas: Fix wrong access issue If bidi_props is NULL, do not access this point. @tizen_fix Change-Id: I8ded9b3c5baec1be2c9ce1a9feb28f780fee41df --- 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;