edc_editor: change sprintf to snprintf

Summary: change sprintf to snprintf for code safety

Reviewers: Jaehyun_Cho, NikaWhite, Hermet

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D3774
This commit is contained in:
taehyub 2016-03-07 20:28:27 +09:00 committed by Hermet Park
parent 1a0f3c7e1d
commit 58f08915e9
1 changed files with 2 additions and 2 deletions

View File

@ -1055,7 +1055,7 @@ edit_edc_load(edit_data *ed, const char *file_path)
//Use line_num given by indent_text_create().
while (num <= line_num)
{
sprintf(buf, "\n%d", num);
snprintf(buf, sizeof(buf), "\n%d", num);
if (!eina_strbuf_append(strbuf_line, buf)) goto err;
num++;
}
@ -1068,7 +1068,7 @@ edit_edc_load(edit_data *ed, const char *file_path)
{
line_num++;
++p;
sprintf(buf, "\n%d", line_num);
snprintf(buf, sizeof(buf), "\n%d", line_num);
if (!eina_strbuf_append(strbuf_line, buf)) goto err;
}
}