The following issues were found
sound/core/pcm_memory.c
1 issues
Line: 154
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 snd_pcm_substream *substream = entry->private_data;
struct snd_card *card = substream->pcm->card;
char line[64], str[64];
size_t size;
struct snd_dma_buffer new_dmab;
if (substream->runtime) {
buffer->error = -EBUSY;
Reported by FlawFinder.
sound/soc/tegra/tegra_audio_graph_card.c
1 issues
Line: 215
static const struct tegra_audio_cdata tegra210_data = {
/* PLLA */
.plla_rates[x8_RATE] = 368640000,
.plla_rates[x11_RATE] = 338688000,
/* PLLA_OUT0 */
.plla_out0_rates[x8_RATE] = 49152000,
.plla_out0_rates[x11_RATE] = 45158400,
};
Reported by Cppcheck.
sound/soc/ti/ams-delta.c
1 issues
Line: 294
Column: 17
CWE codes:
362
*/
tty->disc_data = cx20442_codec;
ret = v253_ops.open(tty);
if (ret < 0)
tty->disc_data = NULL;
return ret;
Reported by FlawFinder.
samples/kprobes/kretprobe_example.c
1 issues
Line: 29
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
#include <linux/limits.h>
#include <linux/sched.h>
static char func_name[NAME_MAX] = "kernel_clone";
module_param_string(func, func_name, NAME_MAX, S_IRUGO);
MODULE_PARM_DESC(func, "Function to kretprobe; this module will report the"
" function's execution time");
/* per-instance private data */
Reported by FlawFinder.
net/sched/sch_teql.c
1 issues
Line: 242
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
if (neigh_event_send(n, skb_res) == 0) {
int err;
char haddr[MAX_ADDR_LEN];
neigh_ha_snapshot(haddr, n, dev);
err = dev_hard_header(skb, dev, ntohs(skb_protocol(skb, false)),
haddr, NULL, skb->len);
Reported by FlawFinder.
sound/soc/ti/davinci-mcasp.c
1 issues
Line: 1934
Column: 33
CWE codes:
126
return ret;
dev_dbg(mcasp->dev, "DMA controller compatible = \"%s\"\n", tmp);
if (!strncmp(tmp, sdma_prefix, strlen(sdma_prefix)))
return PCM_SDMA;
else if (strstr(tmp, "udmap"))
return PCM_UDMA;
return PCM_EDMA;
Reported by FlawFinder.
sound/core/oss/pcm_plugin.h
1 issues
Line: 46
Column: 19
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
struct snd_pcm_plugin_format dst_format; /* destination format */
int src_width; /* sample width in bits */
int dst_width; /* sample width in bits */
snd_pcm_access_t access;
snd_pcm_sframes_t (*src_frames)(struct snd_pcm_plugin *plugin, snd_pcm_uframes_t dst_frames);
snd_pcm_sframes_t (*dst_frames)(struct snd_pcm_plugin *plugin, snd_pcm_uframes_t src_frames);
snd_pcm_sframes_t (*client_channels)(struct snd_pcm_plugin *plugin,
snd_pcm_uframes_t frames,
struct snd_pcm_plugin_channel **channels);
Reported by FlawFinder.
sound/soc/intel/atom/sst-atom-controls.h
1 issues
Line: 698
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
u16 module_id;
u16 pipe_id;
u16 task_id;
char pname[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
struct snd_soc_dapm_widget *w;
};
struct sst_gain_value {
u16 ramp_duration;
Reported by FlawFinder.
net/rxrpc/local_event.c
1 issues
Line: 19
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 <generated/utsrelease.h>
#include "ar-internal.h"
static const char rxrpc_version_string[65] = "linux-" UTS_RELEASE " AF_RXRPC";
/*
* Reply to a version request
*/
static void rxrpc_send_version_request(struct rxrpc_local *local,
Reported by FlawFinder.
sound/soc/intel/atom/sst-mfld-platform-compress.c
1 issues
Line: 159
Column: 30
CWE codes:
362
cb.drain_cb_param = cstream;
cb.drain_notify = sst_drain_notify;
retval = stream->compr_ops->open(sst->dev, &str_params, &cb);
if (retval < 0) {
pr_err("stream allocation failed %d\n", retval);
return retval;
}
Reported by FlawFinder.