drivers: ufs: fix buffer overflow in sprintf
authorAnan Jaser <ananjaser@gmail.com>
Tue, 22 Sep 2020 20:22:57 +0000 (00:22 +0400)
committerivanmeler <i_ivan@windowslive.com>
Wed, 13 Apr 2022 21:14:06 +0000 (21:14 +0000)
commit617c53b4ea2bd5c157cc507fe9ff0bc257c36cc5
tree753e63eaff4f9d632407a6bc22ccd1c0bf17e577
parent4f41c13321599bddbbcc77342bf4135deeca9c40
drivers: ufs: fix buffer overflow in sprintf

drivers/scsi/ufs/ufshcd.c:7588:3: error: 'sprintf' will always overflow; destination buffer has size 16, but format string expands to at le
ast 17 [-Werror,-Wfortify-source]
                sprintf(buf, "U%dH%dL%dX%dQ%dR%dW%dF%d",
                ^

Change-Id: Ic03043dc5df59faf7f19a03deb2fb2d558910db0
drivers/scsi/ufs/ufshcd.c