Message ID | 20230125194649.3485731-2-amadeuszx.slawinski@linux.intel.com |
---|---|
State | Accepted |
Commit | c5d184c92df2b631fb81fe2ce6e96bfc5ba720e5 |
Headers | show |
Series | ASoC: topology: Fixes and cleanups | expand |
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index c3be24b2fac5..b9addbab2b3d 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -2404,7 +2404,7 @@ static int soc_valid_header(struct soc_tplg *tplg, return -EINVAL; } - if (soc_tplg_get_hdr_offset(tplg) + hdr->payload_size >= tplg->fw->size) { + if (soc_tplg_get_hdr_offset(tplg) + le32_to_cpu(hdr->payload_size) >= tplg->fw->size) { dev_err(tplg->dev, "ASoC: invalid header of type %d at offset %ld payload_size %d\n", le32_to_cpu(hdr->type), soc_tplg_get_hdr_offset(tplg),