core: fix size used in some snprintf
This commit is contained in:
parent
1aae49a2eb
commit
c8cd6c4639
@ -460,7 +460,7 @@ util_exec_on_files (const char *directory, int hidden_files, void *data,
|
|||||||
{
|
{
|
||||||
if (hidden_files || (entry->d_name[0] != '.'))
|
if (hidden_files || (entry->d_name[0] != '.'))
|
||||||
{
|
{
|
||||||
snprintf (complete_filename, sizeof (complete_filename) - 1,
|
snprintf (complete_filename, sizeof (complete_filename),
|
||||||
"%s/%s", directory, entry->d_name);
|
"%s/%s", directory, entry->d_name);
|
||||||
lstat (complete_filename, &statbuf);
|
lstat (complete_filename, &statbuf);
|
||||||
if (!S_ISDIR(statbuf.st_mode))
|
if (!S_ISDIR(statbuf.st_mode))
|
||||||
|
@ -1326,11 +1326,11 @@ gui_bar_item_default_hotlist (void *data, struct t_gui_bar_item *item,
|
|||||||
strcat (str_hotlist, GUI_COLOR_CUSTOM_BAR_FG);
|
strcat (str_hotlist, GUI_COLOR_CUSTOM_BAR_FG);
|
||||||
if (CONFIG_INTEGER(config_look_hotlist_names_length) == 0)
|
if (CONFIG_INTEGER(config_look_hotlist_names_length) == 0)
|
||||||
{
|
{
|
||||||
snprintf (format, sizeof (format) - 1, "%%s");
|
snprintf (format, sizeof (format), "%%s");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
snprintf (format, sizeof (format) - 1,
|
snprintf (format, sizeof (format),
|
||||||
"%%.%ds",
|
"%%.%ds",
|
||||||
CONFIG_INTEGER(config_look_hotlist_names_length));
|
CONFIG_INTEGER(config_look_hotlist_names_length));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user