Commit 1e304d42 authored by Christophe Fergeau's avatar Christophe Fergeau Committed by Matt Colyer

Fix buffer overflow

Signed-off-by: 's avatarMatt Colyer <matt@colyer.name>
parent 1c920f3c
......@@ -140,7 +140,7 @@ int store_device_public_key(char* public_key)
g_io_channel_shutdown(file, TRUE, NULL);
/* append device to list */
gchar** new_devices_list = (gchar**)g_malloc(sizeof(gchar*)* (length + 1));
gchar** new_devices_list = (gchar**)g_malloc(sizeof(gchar*)* (length + 2));
int i;
for( i = 0; i < length; i++)
new_devices_list[i] = devices_list[i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment