}
else
{
- if(asprintf(&text_to_read, "%s", (char*)atspi_text_get_text(text_interface, caret_pos, caret_pos + 1, NULL)))
+ if(asprintf(&text_to_read, "%s", (char*)atspi_text_get_text(text_interface, caret_pos, caret_pos + 1, NULL)) < 0)
{
ERROR(MEMORY_ERROR);
return;
vi->voice_type == new_voice)
{
DEBUG("str_cpy %s (%d) -> %s (%d)", sd->language, sd->voice_type, vi->language, vi->voice_type);
- strncpy(sd->language, vi->language, LAN_NAME - 1);
+ snprintf(sd->language, LAN_NAME, "%s", vi->language);
sd->voice_type = vi->voice_type;
DEBUG("after_str_cpy");
char buf[256];
- sprintf(buf, ITEMS_NOTIFICATION, start_idx, end_idx);
+ snprintf(buf, sizeof(buf), ITEMS_NOTIFICATION, start_idx, end_idx);
tts_speak(strdup(buf), EINA_FALSE);
}