forked from enlightenment/enventor
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:
parent
1a0f3c7e1d
commit
58f08915e9
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue