Re: [PATCH] scsi: lpfc: change snprintf to scnprintf for possible overflow

2019-03-25 Thread Martin K. Petersen
James, > Change snprintf to scnprintf. There are generally two cases where > using snprintf causes problems. Applied to 5.2/scsi-queue, thanks! -- Martin K. Petersen Oracle Linux Engineering

[PATCH] scsi: lpfc: change snprintf to scnprintf for possible overflow

2019-03-21 Thread James Smart
From: Willy Tarreau From: Silvio Cesare Change snprintf to scnprintf. There are generally two cases where using snprintf causes problems. 1) Uses of size += snprintf(buf, SIZE - size, fmt, ...) In this case, if snprintf would have written more characters than what the buffer size (SIZE) is, the