Skip to content
Snippets Groups Projects
Commit 03bf22f5 authored by Bradley Bolen's avatar Bradley Bolen Committed by Wolfgang Denk
Browse files

stdio: Fix a possible buffer overflow

Signed-off-by: Bradley Bolen <bradleybolen at yahoo.com>
parent 0789dc14
No related branches found
No related tags found
No related merge requests found
...@@ -160,7 +160,7 @@ int stdio_deregister(const char *devname) ...@@ -160,7 +160,7 @@ int stdio_deregister(const char *devname)
int l; int l;
struct list_head *pos; struct list_head *pos;
struct stdio_dev *dev; struct stdio_dev *dev;
char temp_names[3][8]; char temp_names[3][16];
dev = stdio_get_by_name(devname); dev = stdio_get_by_name(devname);
...@@ -174,7 +174,7 @@ int stdio_deregister(const char *devname) ...@@ -174,7 +174,7 @@ int stdio_deregister(const char *devname)
} }
memcpy (&temp_names[l][0], memcpy (&temp_names[l][0],
stdio_devices[l]->name, stdio_devices[l]->name,
sizeof(stdio_devices[l]->name)); sizeof(temp_names[l]));
} }
list_del(&(dev->list)); list_del(&(dev->list));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment