• C
    ASoC: Intel: sst: Fix firmware name size handling · 279e17ae
    Christian Engelmayer 提交于
    Function sst_acpi_probe() uses plain strcpy for setting member firmware_name
    of a struct intel_sst_drv from member firmware of a struct sst_machines.
    Thereby the destination array has got a length of 20 byte while the source may
    hold 32 byte. Since eg. commit 64b9c90b ("ASoC: Intel: Fix BYTCR firmware
    name") increased strings from "fw_sst_0f28.bin" to "intel/fw_sst_0f28.bin"
    there is an actual possibility that the 20 byte array at the end of struct
    intel_sst_drv is overrun.
    
    Thus increase the size of the destination and use the same define for both
    structs. Detected by Coverity CID 1260087.
    Signed-off-by: NChristian Engelmayer <cengelma@gmx.at>
    Signed-off-by: NMark Brown <broonie@kernel.org>
    Cc: stable@vger.kernel.org
    279e17ae
sst_acpi.c 10.4 KB