ok go nack to snprintf - strncpy isn't save for overruns of a buffer with 0

termination of string here (need to add ectra code to terminate). in this
situation speed really isn't an issue :)



SVN revision: 37235
This commit is contained in:
Carsten Haitzler 2008-10-27 12:01:33 +00:00
parent 6a46d09b3a
commit 3990fc99c9
1 changed files with 2 additions and 2 deletions

View File

@ -278,7 +278,7 @@ _ibar_new(Evas *evas, Instance *inst)
snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/%s/.order", homedir, inst->ci->dir);
}
else
strncpy(buf, inst->ci->dir, sizeof(buf));
snprintf(buf, sizeof(buf), inst->ci->dir);
b->apps = e_order_new(buf);
e_order_update_callback_set(b->apps, _ibar_cb_app_change, b);
_ibar_fill(b);
@ -506,7 +506,7 @@ _ibar_config_update(Config_Item *ci)
snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/%s/.order", homedir, inst->ci->dir);
}
else
strncpy(buf, inst->ci->dir, sizeof(buf));
nprintf(buf, sizeof(buf), inst->ci->dir);
inst->ibar->apps = e_order_new(buf);
_ibar_fill(inst->ibar);
_ibar_resize_handle(inst->ibar);