From: Hyoyoung Chang Date: Wed, 5 Jan 2011 02:35:31 +0000 (+0900) Subject: [label] bugfix at _strbuf_key_value_replace X-Git-Tag: REL_I9200_20110603-1~528 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=656ad978f5c6ac482d545231eaa71bff1c8cbf88;p=framework%2Fuifw%2Felementary.git [label] bugfix at _strbuf_key_value_replace --- diff --git a/src/lib/elm_label.c b/src/lib/elm_label.c index 39c3170..f91e9e7 100644 --- a/src/lib/elm_label.c +++ b/src/lib/elm_label.c @@ -233,8 +233,8 @@ _strbuf_key_value_replace(Eina_Strbuf *srcbuf, const char *key, const char *valu srcstring = eina_strbuf_string_get(srcbuf); curlocater = strstr(srcstring, key); - - if (!curlocater) + + if (!curlocater || !srcstring) insertflag = 1; else { @@ -262,13 +262,13 @@ _strbuf_key_value_replace(Eina_Strbuf *srcbuf, const char *key, const char *valu if (curlocater) { replocater = curlocater + key_len + 1; - while ((*replocater != '=') && (replocater)) + while ((*replocater) && (*replocater != '=')) replocater++; while (*replocater && *replocater != ' ' && *replocater != '>') replocater++; - if (replocater - curlocater > strlen(key) + 1) + if (replocater - curlocater > key_len + 1) { replocater--; eina_strbuf_append_n(diffbuf, curlocater,