stdio: Fix a possible buffer overflow
Signed-off-by: Bradley Bolen <bradleybolen at yahoo.com>
diff --git a/common/stdio.c b/common/stdio.c
index b20772c..1bf9ba0 100644
--- a/common/stdio.c
+++ b/common/stdio.c
@@ -160,7 +160,7 @@
int l;
struct list_head *pos;
struct stdio_dev *dev;
- char temp_names[3][8];
+ char temp_names[3][16];
dev = stdio_get_by_name(devname);
@@ -174,7 +174,7 @@
}
memcpy (&temp_names[l][0],
stdio_devices[l]->name,
- sizeof(stdio_devices[l]->name));
+ sizeof(temp_names[l]));
}
list_del(&(dev->list));