scsi: megasas: null terminate bios version buffer
commit844864fbae66935951529408831c2f22367a57b6
authorPrasad J Pandit <pjp@fedoraproject.org>
Tue, 7 Jun 2016 11:14:03 +0000 (7 16:44 +0530)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 7 Jun 2016 12:09:05 +0000 (7 14:09 +0200)
tree66baf9a29ae51a612322c404e62ab5ac3d7e5169
parent6214a11ac167b1e866c04a81360286d186f04d82
scsi: megasas: null terminate bios version buffer

While reading information via 'megasas_ctrl_get_info' routine,
a local bios version buffer isn't null terminated. Add the
terminating null byte to avoid any OOB access.

Reported-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/megasas.c