megasas: do not read iovec count more than once from frame
commit24c0c77af515acbf0f9705e8096f33ef24d37430
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 1 Jun 2017 15:18:57 +0000 (1 17:18 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 15 Jun 2017 09:04:05 +0000 (15 11:04 +0200)
tree77144f2d0675ef1a54e7c7e7a0ea967718cdb53c
parent134550bf81a026e18cf58b81e2c2cceaf516f92e
megasas: do not read iovec count 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