The following issues were found
security/integrity/ima/ima.h
1 issues
Line: 79
Column: 8
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
/* IMA template field definition */
struct ima_template_field {
const char field_id[IMA_TEMPLATE_FIELD_ID_MAX_LEN];
int (*field_init)(struct ima_event_data *event_data,
struct ima_field_data *field_data);
void (*field_show)(struct seq_file *m, enum ima_show_type show,
struct ima_field_data *field_data);
};
Reported by FlawFinder.
sound/core/seq/seq_midi_emul.c
1 issues
Line: 195
Column: 13
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
break;
case SNDRV_SEQ_EVENT_SYSEX:
if ((ev->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) == SNDRV_SEQ_EVENT_LENGTH_VARIABLE) {
unsigned char sysexbuf[64];
int len;
len = snd_seq_expand_var_event(ev, sizeof(sysexbuf), sysexbuf, 1, 0);
if (len > 0)
sysex(ops, drv, sysexbuf, len, chanset);
}
Reported by FlawFinder.
sound/soc/codecs/nau8810.c
1 issues
Line: 181
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
* and big endian format
*/
reg_val = cpu_to_be16(reg_val);
memcpy(val + i, ®_val, sizeof(reg_val));
}
return 0;
}
Reported by FlawFinder.
sound/soc/codecs/nau8822.c
1 issues
Line: 196
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
* and big endian format
*/
reg_val = cpu_to_be16(reg_val);
memcpy(val + i, ®_val, sizeof(reg_val));
}
return 0;
}
Reported by FlawFinder.
sound/soc/codecs/pcm3168a.c
1 issues
Line: 39
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 PCM3168A_FMT_DSP_MASK 0x4
#define PCM3168A_NUM_SUPPLIES 6
static const char *const pcm3168a_supply_names[PCM3168A_NUM_SUPPLIES] = {
"VDD1",
"VDD2",
"VCCAD1",
"VCCAD2",
"VCCDA1",
Reported by FlawFinder.
sound/soc/codecs/pcm512x.c
1 issues
Line: 26
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 "pcm512x.h"
#define PCM512x_NUM_SUPPLIES 3
static const char * const pcm512x_supply_names[PCM512x_NUM_SUPPLIES] = {
"AVDD",
"DVDD",
"CPVDD",
};
Reported by FlawFinder.
sound/soc/codecs/rt1308-sdw.c
1 issues
Line: 303
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
struct rt1308_sdw_priv *rt1308 = dev_get_drvdata(&slave->dev);
int ret;
memcpy(&rt1308->params, params, sizeof(*params));
ret = rt1308_clock_config(&slave->dev);
if (ret < 0)
dev_err(&slave->dev, "Invalid clk config");
Reported by FlawFinder.
sound/soc/codecs/rt5616.c
1 issues
Line: 301
3, 5, TLV_DB_SCALE_ITEM(3000, 500, 0),
6, 6, TLV_DB_SCALE_ITEM(4400, 0, 0),
7, 7, TLV_DB_SCALE_ITEM(5000, 0, 0),
8, 8, TLV_DB_SCALE_ITEM(5200, 0, 0),
);
static const struct snd_kcontrol_new rt5616_snd_controls[] = {
/* Headphone Output Volume */
SOC_DOUBLE("HP Playback Switch", RT5616_HP_VOL,
Reported by Cppcheck.
sound/soc/codecs/rt5665.c
1 issues
Line: 37
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 RT5665_NUM_SUPPLIES 3
static const char *rt5665_supply_names[RT5665_NUM_SUPPLIES] = {
"AVDD",
"MICVDD",
"VBAT",
};
Reported by FlawFinder.
sound/soc/codecs/rt5668.c
1 issues
Line: 37
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 RT5668_NUM_SUPPLIES 3
static const char *rt5668_supply_names[RT5668_NUM_SUPPLIES] = {
"AVDD",
"MICVDD",
"VBAT",
};
Reported by FlawFinder.