srcstring = eina_strbuf_string_get(srcbuf);
curlocater = strstr(srcstring, key);
-
- if (!curlocater)
+
+ if (!curlocater || !srcstring)
insertflag = 1;
else
{
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,