The following issues were found
sound/soc/intel/skylake/skl.c
1 issues
Line: 680
Column: 2
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
static void load_codec_module(struct hda_codec *codec)
{
#ifdef MODULE
char modalias[MODULE_NAME_LEN];
const char *mod = NULL;
snd_hdac_codec_modalias(&codec->core, modalias, sizeof(modalias));
mod = modalias;
dev_dbg(&codec->core.dev, "loading %s codec module\n", mod);
Reported by FlawFinder.
sound/soc/intel/skylake/skl.h
1 issues
Line: 76
Column: 2
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
struct list_head bind_list;
const char *fw_name;
char tplg_name[64];
unsigned short pci_id;
int supend_active;
struct work_struct probe_work;
Reported by FlawFinder.
sound/soc/mediatek/common/mtk-afe-platform-driver.c
1 issues
Line: 39
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
list_for_each_entry(dai, &afe->sub_dais, list) {
/* dai driver */
memcpy(&afe->dai_drivers[dai_idx],
dai->dai_drivers,
dai->num_dai_drivers *
sizeof(struct snd_soc_dai_driver));
dai_idx += dai->num_dai_drivers;
}
Reported by FlawFinder.
security/selinux/ss/symtab.c
1 issues
Line: 20
Column: 9
CWE codes:
126
val = 0;
keyp = key;
size = strlen(keyp);
for (p = keyp; (p - keyp) < size; p++)
val = (val << 4 | (val >> (8*sizeof(unsigned int)-4))) ^ (*p);
return val;
}
Reported by FlawFinder.
sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
1 issues
Line: 42
Column: 3
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
for (i = 0; i < afe_priv->soc->i2s_num; i++) {
struct mt2701_i2s_path *i2s_path = &afe_priv->i2s_path[i];
struct clk *i2s_ck;
char name[13];
snprintf(name, sizeof(name), "i2s%d_src_sel", i);
i2s_path->sel_ck = devm_clk_get(afe->dev, name);
if (IS_ERR(i2s_path->sel_ck)) {
dev_err(afe->dev, "failed to get %s\n", name);
Reported by FlawFinder.
sound/soc/mediatek/mt6797/mt6797-afe-clk.c
1 issues
Line: 24
Column: 14
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
CLK_NUM
};
static const char *aud_clks[CLK_NUM] = {
[CLK_INFRA_SYS_AUD] = "infra_sys_audio_clk",
[CLK_INFRA_SYS_AUD_26M] = "infra_sys_audio_26m",
[CLK_TOP_MUX_AUD] = "top_mux_audio",
[CLK_TOP_MUX_AUD_BUS] = "top_mux_aud_intbus",
[CLK_TOP_SYSPLL3_D4] = "top_sys_pll3_d4",
Reported by FlawFinder.
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
1 issues
Line: 690
Column: 14
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
.resume = mtk_afe_resume,
};
static const char *aud_clks[MT8173_CLK_NUM] = {
[MT8173_CLK_INFRASYS_AUD] = "infra_sys_audio_clk",
[MT8173_CLK_TOP_PDN_AUD] = "top_pdn_audio",
[MT8173_CLK_TOP_PDN_AUD_BUS] = "top_pdn_aud_intbus",
[MT8173_CLK_I2S0_M] = "i2s0_m",
[MT8173_CLK_I2S1_M] = "i2s1_m",
Reported by FlawFinder.
sound/soc/mediatek/mt8183/mt8183-afe-clk.c
1 issues
Line: 54
Column: 14
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
CLK_NUM
};
static const char *aud_clks[CLK_NUM] = {
[CLK_AFE] = "aud_afe_clk",
[CLK_TML] = "aud_tml_clk",
[CLK_APLL22M] = "aud_apll22m_clk",
[CLK_APLL24M] = "aud_apll24m_clk",
[CLK_APLL1_TUNER] = "aud_apll1_tuner_clk",
Reported by FlawFinder.
sound/soc/mediatek/mt8183/mt8183-dai-i2s.c
1 issues
Line: 1042
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (!i2s_priv)
return -ENOMEM;
memcpy(i2s_priv, &mt8183_i2s_priv[i],
sizeof(struct mtk_afe_i2s_priv));
afe_priv->dai_priv[mt8183_i2s_priv[i].id] = i2s_priv;
}
Reported by FlawFinder.
sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
1 issues
Line: 32
Column: 14
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
PIN_STATE_MAX
};
static const char * const mt8183_pin_str[PIN_STATE_MAX] = {
"default", "aud_tdm_out_on", "aud_tdm_out_off", "wov",
};
struct mt8183_mt6358_ts3a227_max98357_priv {
struct pinctrl *pinctrl;
Reported by FlawFinder.