The following issues were found
sound/soc/sti/sti_uniperif.c
1 issues
Line: 228
CWE codes:
758
/* set unip word position */
for (i = 0, j = 0, k = 0; (i < slots_num) && (k < WORD_MAX); i++) {
if ((slots_mask >> i) & 0x01) {
word16_pos[j] = i * slot_width;
if (slot_width == 4) {
word16_pos[j + 1] = word16_pos[j] + 2;
j++;
Reported by Cppcheck.
security/landlock/syscalls.c
1 issues
Line: 248
CWE codes:
476
int err = 0;
BUILD_BUG_ON(!__same_type(fd,
((struct landlock_path_beneath_attr *)NULL)->parent_fd));
/* Handles O_PATH. */
f = fdget_raw(fd);
if (!f.file)
return -EBADF;
Reported by Cppcheck.
sound/soc/codecs/wm8985.c
1 issues
Line: 36
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 "wm8985.h"
#define WM8985_NUM_SUPPLIES 4
static const char *wm8985_supply_names[WM8985_NUM_SUPPLIES] = {
"DCVDD",
"DBVDD",
"AVDD1",
"AVDD2"
};
Reported by FlawFinder.
sound/soc/codecs/wm8991.c
1 issues
Line: 114
static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(out_mix_tlv, -2100, 300, 0);
static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(out_pga_tlv,
0x00, 0x2f, SNDRV_CTL_TLVD_DB_SCALE_ITEM(SNDRV_CTL_TLVD_DB_GAIN_MUTE, 0, 1),
0x30, 0x7f, SNDRV_CTL_TLVD_DB_SCALE_ITEM(-7300, 100, 0),
);
static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(out_dac_tlv,
0x00, 0xbf, SNDRV_CTL_TLVD_DB_SCALE_ITEM(-71625, 375, 1),
0xc0, 0xff, SNDRV_CTL_TLVD_DB_SCALE_ITEM(0, 0, 0),
);
Reported by Cppcheck.
sound/soc/codecs/wm8993.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
#include "wm_hubs.h"
#define WM8993_NUM_SUPPLIES 6
static const char *wm8993_supply_names[WM8993_NUM_SUPPLIES] = {
"DCVDD",
"DBVDD",
"AVDD1",
"AVDD2",
"CPVDD",
Reported by FlawFinder.
sound/soc/codecs/wm8994.c
1 issues
Line: 3305
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
int i, ret;
for (i = 0; i < ARRAY_SIZE(wm8994->fll); i++) {
memcpy(&wm8994->fll_suspend[i], &wm8994->fll[i],
sizeof(struct wm8994_fll_config));
ret = _wm8994_set_fll(component, i + 1, 0, 0, 0);
if (ret < 0)
dev_warn(component->dev, "Failed to stop FLL%d: %d\n",
i + 1, ret);
Reported by FlawFinder.
sound/soc/codecs/wm8995.c
1 issues
Line: 33
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 "wm8995.h"
#define WM8995_NUM_SUPPLIES 8
static const char *wm8995_supply_names[WM8995_NUM_SUPPLIES] = {
"DCVDD",
"DBVDD1",
"DBVDD2",
"DBVDD3",
"AVDD1",
Reported by FlawFinder.
sound/soc/codecs/wm8995.h
1 issues
Line: 4241
Column: 6
CWE codes:
120
20
snd_soc_dapm_get_volsw, wm8995_put_class_w)
struct wm8995_reg_access {
u16 read;
u16 write;
u16 vol;
};
/* Sources for AIF1/2 SYSCLK - use with set_dai_sysclk() */
Reported by FlawFinder.
sound/soc/codecs/wm8996.c
1 issues
Line: 43
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
#define HPOUT2R 8
#define WM8996_NUM_SUPPLIES 3
static const char *wm8996_supply_names[WM8996_NUM_SUPPLIES] = {
"DBVDD",
"AVDD1",
"AVDD2",
};
Reported by FlawFinder.
sound/soc/stm/stm32_i2s.c
1 issues
Line: 434
Column: 2
CWE codes:
120
Suggestion:
Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused)
*p++ = *s++;
i++;
}
strcat(p, "_mclk");
mclk->hw.init = CLK_HW_INIT(mclk_name, pname, &mclk_ops, 0);
mclk->i2s_data = i2s;
hw = &mclk->hw;
Reported by FlawFinder.