summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/sst/sst_acpi.c
diff options
context:
space:
mode:
authorChristian Engelmayer <cengelma@gmx.at>2015-02-07 23:40:52 +0100
committerMark Brown <broonie@kernel.org>2015-02-08 11:08:27 +0800
commit279e17ae81c17b40ae7a6c9e10f386a7aac7aa55 (patch)
tree1c4726682f64ce4c3226e7b177ab5c1dde8b78a7 /sound/soc/intel/sst/sst_acpi.c
parent5c2b06369dafd796ebb4f17dab543d3da500245e (diff)
ASoC: Intel: sst: Fix firmware name size handling
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 64b9c90b8600 ("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: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'sound/soc/intel/sst/sst_acpi.c')
-rw-r--r--sound/soc/intel/sst/sst_acpi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/intel/sst/sst_acpi.c b/sound/soc/intel/sst/sst_acpi.c
index b3360139c41..51f83bad531 100644
--- a/sound/soc/intel/sst/sst_acpi.c
+++ b/sound/soc/intel/sst/sst_acpi.c
@@ -47,7 +47,7 @@ struct sst_machines {
char board[32];
char machine[32];
void (*machine_quirk)(void);
- char firmware[32];
+ char firmware[FW_NAME_SIZE];
struct sst_platform_info *pdata;
};