summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBradley Bolen <bradleybolen@yahoo.com>2011-08-22 11:48:05 +0000
committerWolfgang Denk <wd@denx.de>2011-09-04 23:27:52 +0200
commit03bf22f55990d27a1d3a5f8c6f8c94fb400f77d4 (patch)
tree5588bc896a1dc2c159515a6c4435603a58b08e42
parent0789dc14d229660bd5c3a9a0b8d7bbb5ebf45485 (diff)
downloadu-boot-imx-03bf22f55990d27a1d3a5f8c6f8c94fb400f77d4.zip
u-boot-imx-03bf22f55990d27a1d3a5f8c6f8c94fb400f77d4.tar.gz
u-boot-imx-03bf22f55990d27a1d3a5f8c6f8c94fb400f77d4.tar.bz2
stdio: Fix a possible buffer overflow
Signed-off-by: Bradley Bolen <bradleybolen at yahoo.com>
-rw-r--r--common/stdio.c4
1 files changed, 2 insertions, 2 deletions
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 stdio_deregister(const char *devname)
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 @@ int stdio_deregister(const char *devname)
}
memcpy (&temp_names[l][0],
stdio_devices[l]->name,
- sizeof(stdio_devices[l]->name));
+ sizeof(temp_names[l]));
}
list_del(&(dev->list));