Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 46477226 authored by Jayachandran C's avatar Jayachandran C Committed by James Bottomley
Browse files

[SCSI] Fix issue reported by coverity in drivers/scsi/scsi_ioctl.c



This patch attempts to fix an issue found in drivers/scsi/scsi_ioctl.c by Coverity.

Error reported:
CID: 3437
Checker: FORWARD_NULL (help)
File: /export2/p4-coverity/mc2/linux26/drivers/scsi/scsi_ioctl.c
Function: scsi_ioctl_send_command
Description: Variable "buf" tracked as NULL was passed to a function that dereferences it.

Patch description:
buf can be NULL if inlen and outlen are both 0. This patch adds check if the
length is non-zero before calling copy from/to user.

Signed-off-by: default avatarJayachandran C. <c.jayachandran@gmail.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent b5141128
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment