Merge pull request #78 from ryncsn/master
Fix an possible overflow error
This commit is contained in:
commit
5a1c7b89f7
|
@ -444,8 +444,8 @@ gboolean sock_handle(gint fd, GIOCondition condition, gpointer user_data __attri
|
||||||
}
|
}
|
||||||
if (!strncmp(buff, "setup", strlen("setup"))) {
|
if (!strncmp(buff, "setup", strlen("setup"))) {
|
||||||
char banned[512];
|
char banned[512];
|
||||||
char *setup = calloc(strlen("SLEEP ") + 11 +1, 1);
|
char *setup = calloc(strlen("SLEEP ") + 11 + 1, 1);
|
||||||
snprintf(setup, 2048, "SLEEP %d ", sleep_interval);
|
snprintf(setup, strlen("SLEEP ") + 11 + 1, "SLEEP %d ", sleep_interval);
|
||||||
if(g_list_length(cl_banned_irqs) > 0) {
|
if(g_list_length(cl_banned_irqs) > 0) {
|
||||||
for_each_irq(cl_banned_irqs, get_irq_data, setup);
|
for_each_irq(cl_banned_irqs, get_irq_data, setup);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue