From: Dan Carpenter Date: Thu, 10 Mar 2011 15:23:26 +0000 (+0300) Subject: libertas: fix write past end of array in mesh_id_get() X-Git-Tag: v2.6.39-rc1~468^2~25^2^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d89dba7a275f40757d27ba16c8bc6aa424656bbe;p=pandora-kernel.git 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 Acked-by: Dan Williams Signed-off-by: John W. Linville --- Reading git-diff-tree failed