Skip to content
Commit 1683ce57 authored by Andrew Vasquez's avatar Andrew Vasquez Committed by Martin K. Petersen
Browse files

scsi: qedi: Fix truncation of CHAP name and secret



The data in NVRAM is not guaranteed to be NUL terminated.  Since
snprintf expects byte-stream to accommodate null byte, the CHAP secret
is truncated.  Use sprintf instead of snprintf to fix the truncation of
CHAP name and secret.

Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@cavium.com>
Signed-off-by: default avatarNilesh Javali <nilesh.javali@cavium.com>
Reviewed-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Acked-by: default avatarChris Leech <cleech@redhat.com>
Acked-by: default avatarLee Duncan <lduncan@suse.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent f3767225
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment