Re: [Qemu-devel] [PATCH] scsi: Don't deference in_buf if NULL

2018-01-05 Thread Anthoine Bourgeois
On Thu, Jan 04, 2018 at 11:02:25AM -0600, Eric Blake wrote: On 01/03/2018 08:42 PM, Fam Zheng wrote: scsi_disk_emulate_command passes in_buf=NULL and in_len=0 in the REQUEST_SENSE branch. Inline the fixed_in evaluation and put it after the in_len test. Signed-off-by: Fam Zheng --- scsi/utils.

Re: [Qemu-devel] [PATCH] scsi: Don't deference in_buf if NULL

2018-01-04 Thread Fam Zheng
On Thu, 01/04 11:41, Eric Blake wrote: > On 01/03/2018 08:42 PM, Fam Zheng wrote: > > scsi_disk_emulate_command passes in_buf=NULL and in_len=0 in the > > REQUEST_SENSE branch. Inline the fixed_in evaluation and put it after > > the in_len test. > > > > Signed-off-by: Fam Zheng > > --- > > scsi/

Re: [Qemu-devel] [PATCH] scsi: Don't deference in_buf if NULL

2018-01-04 Thread Eric Blake
On 01/03/2018 08:42 PM, Fam Zheng wrote: > scsi_disk_emulate_command passes in_buf=NULL and in_len=0 in the > REQUEST_SENSE branch. Inline the fixed_in evaluation and put it after > the in_len test. > > Signed-off-by: Fam Zheng > --- > scsi/utils.c | 4 +--- > 1 file changed, 1 insertion(+), 3 d

Re: [Qemu-devel] [PATCH] scsi: Don't deference in_buf if NULL

2018-01-04 Thread Eric Blake
On 01/03/2018 08:42 PM, Fam Zheng wrote: > scsi_disk_emulate_command passes in_buf=NULL and in_len=0 in the > REQUEST_SENSE branch. Inline the fixed_in evaluation and put it after > the in_len test. > > Signed-off-by: Fam Zheng > --- > scsi/utils.c | 4 +--- > 1 file changed, 1 insertion(+), 3 d

[Qemu-devel] [PATCH] scsi: Don't deference in_buf if NULL

2018-01-03 Thread Fam Zheng
scsi_disk_emulate_command passes in_buf=NULL and in_len=0 in the REQUEST_SENSE branch. Inline the fixed_in evaluation and put it after the in_len test. Signed-off-by: Fam Zheng --- scsi/utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scsi/utils.c b/scsi/utils.c ind