mirror of
				https://github.com/qemu/qemu.git
				synced 2025-10-31 12:07:31 +00:00 
			
		
		
		
	iscsi: Don't access non-existent scsi_lba_status_descriptor
In iscsi_co_block_status(), we may have received num_descriptors == 0 from the iscsi server. Therefore, we can't unconditionally access lbas->descriptors[0]. Add the missing check. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Felipe Franciosi <felipe@nutanix.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
		
							parent
							
								
									693fd2acdf
								
							
						
					
					
						commit
						5fbf1d56c2
					
				| @ -753,7 +753,7 @@ retry: | ||||
|     } | ||||
| 
 | ||||
|     lbas = scsi_datain_unmarshall(iTask.task); | ||||
|     if (lbas == NULL) { | ||||
|     if (lbas == NULL || lbas->num_descriptors == 0) { | ||||
|         ret = -EIO; | ||||
|         goto out_unlock; | ||||
|     } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Kevin Wolf
						Kevin Wolf