The following issues were found
sound/soc/mediatek/mt8192/mt8192-afe-clk.c
1 issues
Line: 17
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
#include "mt8192-afe-clk.h"
#include "mt8192-afe-common.h"
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/mt8192/mt8192-afe-control.c
1 issues
Line: 158
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return -ENOMEM;
if (priv_data)
memcpy(temp_data, priv_data, priv_size);
afe_priv->dai_priv[id] = temp_data;
return 0;
}
Reported by FlawFinder.
sound/soc/meson/axg-card.c
1 issues
Line: 162
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 device_node *node,
struct axg_dai_link_tdm_data *be)
{
char propname[32];
u32 tx, rx;
int i;
be->tx_mask = devm_kcalloc(card->dev, AXG_TDM_NUM_LANES,
sizeof(*be->tx_mask), GFP_KERNEL);
Reported by FlawFinder.
sound/soc/meson/axg-tdm-interface.c
1 issues
Line: 515
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return -ENOMEM;
for (i = 0; i < ARRAY_SIZE(axg_tdm_iface_dai_drv); i++)
memcpy(&dai_drv[i], &axg_tdm_iface_dai_drv[i],
sizeof(*dai_drv));
/* Bit clock provided on the pad */
iface->sclk = devm_clk_get(dev, "sclk");
if (IS_ERR(iface->sclk)) {
Reported by FlawFinder.
security/apparmor/domain.c
1 issues
Line: 158
return 0;
next:
label_for_each_cont(i, label, tp) {
if (!aa_ns_visible(profile->ns, tp->ns, subns))
continue;
state = aa_dfa_match(profile->file.dfa, state, "//&");
state = match_component(profile, tp, false, state);
if (!state)
Reported by Cppcheck.
security/selinux/ss/sidtab.c
1 issues
Line: 588
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
}
cache->parent = entry;
cache->len = str_len;
memcpy(cache->str, str, str_len);
list_add(&cache->lru_member, &s->cache_lru_list);
rcu_assign_pointer(entry->cache, cache);
out_unlock:
Reported by FlawFinder.
sound/soc/qcom/qdsp6/q6asm-dai.c
1 issues
Line: 723
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
codec_options = &(prtd->codec.options);
memcpy(&prtd->codec, codec, sizeof(*codec));
switch (codec->id) {
case SND_AUDIOCODEC_FLAC:
memset(&flac_cfg, 0x0, sizeof(struct q6asm_flac_cfg));
Reported by FlawFinder.
net/sched/sch_cake.c
1 issues
Line: 1158
Column: 11
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 sk_buff *elig_ack = NULL, *elig_ack_prev = NULL;
struct sk_buff *skb_check, *skb_prev = NULL;
const struct ipv6hdr *ipv6h, *ipv6h_check;
unsigned char _tcph[64], _tcph_check[64];
const struct tcphdr *tcph, *tcph_check;
const struct iphdr *iph, *iph_check;
struct ipv6hdr _iph, _iph_check;
const struct sk_buff *skb;
int seglen, num_found = 0;
Reported by FlawFinder.
sound/soc/rockchip/rk3399_gru_sound.c
1 issues
Line: 550
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return -EINVAL;
}
memcpy(routes + card->num_dapm_routes,
rockchip_routes[index].routes,
rockchip_routes[index].num_routes * sizeof(*routes));
card->num_dapm_routes += rockchip_routes[index].num_routes;
}
Reported by FlawFinder.
net/wireless/debugfs.c
1 issues
Line: 18
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
size_t count, loff_t *ppos) \
{ \
struct wiphy *wiphy = file->private_data; \
char buf[buflen]; \
int res; \
\
res = scnprintf(buf, buflen, fmt "\n", ##value); \
return simple_read_from_buffer(userbuf, count, ppos, buf, res); \
} \
Reported by FlawFinder.