diff options
author | Dan Carpenter <error27@gmail.com> | 2011-03-10 15:23:26 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-03-11 19:15:36 (GMT) |
commit | d89dba7a275f40757d27ba16c8bc6aa424656bbe (patch) | |
tree | c42b16fc568b9ffdb0458b59c6112f9eb9f24792 /net | |
parent | 23952ec92850bcdc91b8167fa95ec05dd59a80ea (diff) | |
download | linux-fsl-qoriq-d89dba7a275f40757d27ba16c8bc6aa424656bbe.tar.xz |
libertas: fix write past end of array in mesh_id_get()
defs.meshie.val.mesh_id is 32 chars long. It's not supposed to be NUL
terminated. This code puts a terminator on the end to make it easier to
print to sysfs. The problem is that if the mesh_id fills the entire
buffer the original code puts the terminator one spot past the end.
The way the original code was written, there was a check to make sure
that maxlen was less than PAGE_SIZE. Since we know that maxlen is at
most 34 chars, I just removed the check.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions