megasas: do not read sense length more than once from frame
commit134550bf81a026e18cf58b81e2c2cceaf516f92e
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 1 Jun 2017 15:18:39 +0000 (1 17:18 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 15 Jun 2017 09:04:05 +0000 (15 11:04 +0200)
tree48fb758c676e6776b60fc1d4547547d20446dc3e
parent660174fc1b346803b3f1d7c260e2a36329b66435
megasas: do not read sense length more than once from frame

Avoid TOC-TOU bugs depending on how the compiler behaves.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/megasas.c