Commit 03bf22f55990d27a1d3a5f8c6f8c94fb400f77d4
Committed by
Wolfgang Denk
1 parent
0789dc14d2
Exists in
master
and in
54 other branches
stdio: Fix a possible buffer overflow
Signed-off-by: Bradley Bolen <bradleybolen at yahoo.com>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
common/stdio.c
... | ... | @@ -160,7 +160,7 @@ |
160 | 160 | int l; |
161 | 161 | struct list_head *pos; |
162 | 162 | struct stdio_dev *dev; |
163 | - char temp_names[3][8]; | |
163 | + char temp_names[3][16]; | |
164 | 164 | |
165 | 165 | dev = stdio_get_by_name(devname); |
166 | 166 | |
... | ... | @@ -174,7 +174,7 @@ |
174 | 174 | } |
175 | 175 | memcpy (&temp_names[l][0], |
176 | 176 | stdio_devices[l]->name, |
177 | - sizeof(stdio_devices[l]->name)); | |
177 | + sizeof(temp_names[l])); | |
178 | 178 | } |
179 | 179 | |
180 | 180 | list_del(&(dev->list)); |