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: NAndrew Vasquez <andrew.vasquez@cavium.com> Signed-off-by: NNilesh Javali <nilesh.javali@cavium.com> Reviewed-by: NBart Van Assche <bart.vanassche@wdc.com> Acked-by: NChris Leech <cleech@redhat.com> Acked-by: NLee Duncan <lduncan@suse.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
Showing
想要评论请 注册 或 登录