Andrew Vasquez 1683ce57f5 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: Andrew Vasquez <andrew.vasquez@cavium.com>
Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Acked-by: Chris Leech <cleech@redhat.com>
Acked-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-02-13 21:35:39 -05:00
..
2018-01-30 22:26:14 -05:00
2018-01-22 20:03:57 -05:00
2017-12-04 20:32:53 -05:00
2017-12-04 20:32:53 -05:00
2017-08-25 17:21:11 -04:00
2017-08-24 22:29:06 -04:00
2017-08-25 17:21:10 -04:00
2017-08-08 11:49:51 -04:00
2017-11-14 16:23:44 -08:00
2017-12-07 21:32:03 -05:00
2017-11-14 16:23:44 -08:00
2017-04-13 13:58:20 -04:00
2017-11-14 16:23:44 -08:00
2017-09-07 12:12:43 -07:00
2017-12-04 20:32:53 -05:00
2017-04-26 18:32:29 -04:00