From: Hyoyoung Chang <hyoyoung.chang@samsung.com>
authorHyoyoung Chang <hyoyoung.chang@samsung.com>
Wed, 5 Jan 2011 06:21:24 +0000 (06:21 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Wed, 5 Jan 2011 06:21:24 +0000 (06:21 +0000)
Subject: [E-devel] elm_label patch(bugfix)

It's a bugfix patch of elm_label.
In strbuf_key_value_replace, null pointer reference can be occured

SVN revision: 55870

src/lib/elm_label.c

index 7665d71..5240cec 100644 (file)
@@ -262,15 +262,13 @@ _strbuf_key_value_replace(Eina_Strbuf *srcbuf, const char *key, const char *valu
                   replocater = curlocater + key_len + 1;
                   while ((*replocater != '=') && (replocater))
                     replocater++;
-                  if (replocater)
-                    {
-                       replocater++;
-                       while ((*replocater != ' ') && 
-                              (*replocater != '>') && 
-                              (!replocater))
-                         replocater++;
-                    }
-                  if (replocater)
+
+                  while ((*replocater) && 
+                         (*replocater != ' ') && 
+                         (*replocater != '>'))
+                    replocater++;
+
+                  if ((replocater - curlocater) > (key_len + 1))
                     {
                        replocater--;
                        eina_strbuf_append_n(diffbuf, curlocater,