The following issues were found
net/dccp/ccid.c
1 issues
Line: 85
Column: 2
CWE codes:
134
Suggestion:
Use a constant for the format specification
va_list args;
va_start(args, fmt);
vsnprintf(slab_name_fmt, CCID_SLAB_NAME_LENGTH, fmt, args);
va_end(args);
slab = kmem_cache_create(slab_name_fmt, sizeof(struct ccid) + obj_size, 0,
SLAB_HWCACHE_ALIGN, NULL);
return slab;
Reported by FlawFinder.
net/dccp/feat.c
1 issues
Line: 524
CWE codes:
476
new->empty_confirm = (fval == NULL);
new->val.nn = 0; /* zeroes the whole structure */
if (!new->empty_confirm)
new->val = *fval;
new->needs_mandatory = false;
return 0;
}
Reported by Cppcheck.
include/sound/gus.h
1 issues
Line: 309
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
unsigned short reg_dram;
unsigned short reg_timerctrl;
unsigned short reg_timerdata;
unsigned char ics_regs[6][2];
/* --------- */
unsigned char active_voices; /* active voices */
unsigned char active_voice; /* selected voice (GF1PAGE register) */
Reported by FlawFinder.
net/dccp/output.c
1 issues
Line: 495
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
break;
case DCCP_RESET_CODE_OPTION_ERROR:
case DCCP_RESET_CODE_MANDATORY_ERROR:
memcpy(dhr->dccph_reset_data, dcb->dccpd_reset_data, 3);
break;
}
/*
* From RFC 4340, 8.3.1:
* If P.ackno exists, set R.seqno := P.ackno + 1.
Reported by FlawFinder.
net/dccp/trace.h
1 issues
Line: 53
__entry->dport = ntohs(inet->inet_dport);
__entry->size = size;
if (hc) {
__entry->tx_s = hc->tx_s;
__entry->tx_rtt = hc->tx_rtt;
__entry->tx_p = hc->tx_p;
__entry->tx_x_calc = hc->tx_x_calc;
__entry->tx_x_recv = hc->tx_x_recv >> 6;
Reported by Cppcheck.
include/sound/emux_synth.h
1 issues
Line: 210
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 snd_emux_effect_table {
/* Emu8000 specific effects */
short val[EMUX_NUM_EFFECTS];
unsigned char flag[EMUX_NUM_EFFECTS];
};
#endif /* SNDRV_EMUX_USE_RAW_EFFECT */
/*
Reported by FlawFinder.
include/sound/dmaengine_pcm.h
1 issues
Line: 148
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
void *buf, unsigned long bytes);
dma_filter_fn compat_filter_fn;
struct device *dma_dev;
const char *chan_names[SNDRV_PCM_STREAM_LAST + 1];
const struct snd_pcm_hardware *pcm_hardware;
unsigned int prealloc_buffer_size;
};
Reported by FlawFinder.
include/sound/da7219.h
1 issues
Line: 41
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
struct da7219_pdata {
bool wakeup_source;
const char *dai_clk_names[DA7219_DAI_NUM_CLKS];
/* Mic */
enum da7219_micbias_voltage micbias_lvl;
enum da7219_mic_amp_in_sel mic_amp_in_sel;
Reported by FlawFinder.
net/decnet/dn_nsp_out.c
1 issues
Line: 554
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
*msg++ = ddl;
if (ddl) {
memcpy(msg, dd, ddl);
}
/*
* This doesn't go via the dn_nsp_send() function since we need
* to be able to send disc packets out which have no socket
Reported by FlawFinder.
include/sound/ak4531_codec.h
1 issues
Line: 58
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
void *private_data;
void (*private_free) (struct snd_ak4531 *ak4531);
/* --- */
unsigned char regs[0x20];
struct mutex reg_mutex;
};
int snd_ak4531_mixer(struct snd_card *card, struct snd_ak4531 *_ak4531,
struct snd_ak4531 **rak4531);
Reported by FlawFinder.