i40e: Fix off by one in i40e_dbg_command_write
authorAlan Cox <alan@linux.intel.com>
Thu, 12 Dec 2013 02:44:24 +0000 (02:44 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 18 Dec 2013 06:42:44 +0000 (22:42 -0800)
commit5561b6a1b3abaa27f6e52e4f7559c8733ca45e69
treee7f28a2baadb085e900a470d2202f1c797771c19
parent582a74e5d3c243cff8d9af13d35e4ac829647e9f
i40e: Fix off by one in i40e_dbg_command_write

We assume that the resulting buffer is zero terminated when we then
re-use it. The sscanf is limited to 512 bytes but needs to be 511
to allow for a terminator.

One of a set of problems noted by Jackie Chang

Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Shannon Nelson <Shannon.nelson@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_debugfs.c