forked from enlightenment/enventor
config_data: change sprintf function to snprintf function
Summary: change sprintf to snprintf for code safety @fix Reviewers: Hermet, NikaWhite, Jaehyun_Cho Reviewed By: Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D3772
This commit is contained in:
parent
bdbf20acd8
commit
1a0f3c7e1d
|
@ -190,7 +190,7 @@ config_load(void)
|
|||
|
||||
if (!cd->img_path_list)
|
||||
{
|
||||
sprintf(buf, "%s/images", elm_app_data_dir_get());
|
||||
snprintf(buf, sizeof(buf), "%s/images", elm_app_data_dir_get());
|
||||
config_img_path_set(buf);
|
||||
}
|
||||
else cd->img_path_buf =
|
||||
|
@ -198,7 +198,7 @@ config_load(void)
|
|||
|
||||
if (!cd->snd_path_list)
|
||||
{
|
||||
sprintf(buf, "%s/sounds", elm_app_data_dir_get());
|
||||
snprintf(buf, sizeof(buf), "%s/sounds", elm_app_data_dir_get());
|
||||
config_snd_path_set(buf);
|
||||
}
|
||||
else cd->snd_path_buf =
|
||||
|
@ -206,7 +206,7 @@ config_load(void)
|
|||
|
||||
if (!cd->fnt_path_list)
|
||||
{
|
||||
sprintf(buf, "%s/fonts", elm_app_data_dir_get());
|
||||
snprintf(buf, sizeof(buf), "%s/fonts", elm_app_data_dir_get());
|
||||
config_fnt_path_set(buf);
|
||||
}
|
||||
else cd->fnt_path_buf =
|
||||
|
@ -214,7 +214,7 @@ config_load(void)
|
|||
|
||||
if (!cd->dat_path_list)
|
||||
{
|
||||
sprintf(buf, "%s/data", elm_app_data_dir_get());
|
||||
snprintf(buf, sizeof(buf), "%s/data", elm_app_data_dir_get());
|
||||
config_dat_path_set(buf);
|
||||
}
|
||||
else cd->dat_path_buf =
|
||||
|
|
Loading…
Reference in New Issue