return;
if (sd->password_mode) memset(sd->text, 0, sd->char_length);
- free(sd->text);
- sd->text = NULL;
+ E_FREE(sd->text);
sd->char_length = 0;
sd->unicode_length = 0;
sd->allocated_length = -1;
if (end_id <= start_id) return NULL;
range = malloc((end_id - start_id + 1) * sizeof(char));
+ if (!range) return NULL;
+
strncpy(range, &sd->text[start_id], end_id - start_id);
range[end_id - start_id] = '\0';
}
else
{
- sd->text = realloc(sd->text, new_allocated_length + 1);
- if (!sd->text)
+ char *p = realloc(sd->text, new_allocated_length + 1);
+ if (!p)
{
sd->text = old;
return 0;
}
+ sd->text = p;
}
sd->allocated_length = new_allocated_length;
}
char *text;
text = malloc((sd->unicode_length + 1) * sizeof(char));
+ if (!text) return;
+
memset(text, '*', sd->unicode_length * sizeof(char));
text[sd->unicode_length] = '\0';
edje_object_part_text_set(sd->text_object, "e.text.text", text);
evas_object_geometry_get(object, &ox, &oy, NULL, NULL);
sd->text = malloc((E_EDITABLE_BLOCK_SIZE + 1) * sizeof(char));
+ if (!sd->text) return;
+
sd->text[0] = '\0';
sd->char_length = 0;
sd->unicode_length = 0;
len = strlen(sd->typebuf.buf);
if (len + strlen(s) + 2 + 1 >= sd->typebuf.size)
{
- sd->typebuf.buf = realloc(sd->typebuf.buf, sd->typebuf.size + strlen(s) + 16);
- if (sd->typebuf.buf)
- sd->typebuf.size = sd->typebuf.size + strlen(s) + 16;
+ char *p = realloc(sd->typebuf.buf, sd->typebuf.size + strlen(s) + 16);
+ if (p)
+ {
+ sd->typebuf.buf = p;
+ sd->typebuf.size = sd->typebuf.size + strlen(s) + 16;
+ }
else
{
_e_typebuf_clean(obj);