The following issues were found
drivers/media/tuners/qt1010.c
1 issues
Line: 437
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
"%s: Quantek QT1010 successfully identified\n",
KBUILD_MODNAME);
memcpy(&fe->ops.tuner_ops, &qt1010_tuner_ops,
sizeof(struct dvb_tuner_ops));
fe->tuner_priv = priv;
return fe;
}
Reported by FlawFinder.
drivers/media/test-drivers/vivid/vivid-vid-common.c
1 issues
Line: 1058
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
edid->blocks = dev->edid_blocks - edid->start_block;
if (adap)
v4l2_set_edid_phys_addr(dev->edid, dev->edid_blocks * 128, adap->phys_addr);
memcpy(edid->edid, dev->edid + edid->start_block * 128, edid->blocks * 128);
return 0;
}
Reported by FlawFinder.
drivers/media/tuners/tda18271-maps.c
1 issues
Line: 1287
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
ret = -EINVAL;
break;
}
memcpy(priv->rf_cal_state, &tda18271_rf_band_template,
sizeof(tda18271_rf_band_template));
return ret;
}
Reported by FlawFinder.
drivers/media/test-drivers/vivid/vivid-core.h
1 issues
Line: 571
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
u8 cec_output2bus_map[MAX_OUTPUTS];
/* CEC OSD String */
char osd[14];
unsigned long osd_jiffies;
bool meta_pts;
bool meta_scr;
};
Reported by FlawFinder.
drivers/media/test-drivers/vivid/vivid-core.c
1 issues
Line: 1826
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
dev->sdr_buffersize = SDR_CAP_SAMPLES_PER_BUF * 2;
dev->edid_max_blocks = dev->edid_blocks = 2;
memcpy(dev->edid, vivid_hdmi_edid, sizeof(vivid_hdmi_edid));
dev->radio_rds_init_time = ktime_get();
/* create all controls */
ret = vivid_create_controls(dev, ccs_cap == -1, ccs_out == -1, no_error_inj,
in_type_counter[TV] || in_type_counter[SVID] ||
Reported by FlawFinder.
drivers/media/test-drivers/vimc/vimc-sensor.c
1 issues
Line: 201
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
const unsigned int line_height = 16;
u8 *basep[TPG_MAX_PLANES][2];
unsigned int line = 1;
char str[100];
tpg_fill_plane_buffer(&vsen->tpg, 0, 0, vsen->frame);
tpg_calc_text_basep(&vsen->tpg, basep, 0, vsen->frame);
switch (vsen->osd_value) {
case VIMC_SEN_OSD_SHOW_ALL: {
Reported by FlawFinder.
drivers/media/test-drivers/vimc/vimc-capture.c
1 issues
Line: 387
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
vbuf = vb2_plane_vaddr(&vimc_buf->vb2.vb2_buf, 0);
memcpy(vbuf, frame, vcap->format.sizeimage);
/* Set it as ready */
vb2_set_plane_payload(&vimc_buf->vb2.vb2_buf, 0,
vcap->format.sizeimage);
vb2_buffer_done(&vimc_buf->vb2.vb2_buf, VB2_BUF_STATE_DONE);
Reported by FlawFinder.
drivers/media/tuners/tua9001.c
1 issues
Line: 217
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
}
fe->tuner_priv = dev;
memcpy(&fe->ops.tuner_ops, &tua9001_tuner_ops,
sizeof(struct dvb_tuner_ops));
i2c_set_clientdata(client, dev);
dev_info(&client->dev, "Infineon TUA9001 successfully attached\n");
return 0;
Reported by FlawFinder.
drivers/media/tuners/tuner-simple.c
1 issues
Line: 1109
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
mutex_unlock(&tuner_simple_list_mutex);
memcpy(&fe->ops.tuner_ops, &simple_tuner_ops,
sizeof(struct dvb_tuner_ops));
if (type != priv->type)
tuner_warn("couldn't set type to %d. Using %d (%s) instead\n",
type, priv->type, priv->tun->name);
Reported by FlawFinder.
drivers/media/test-drivers/vidtv/vidtv_tuner.c
1 issues
Line: 407
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
tuner_dev->fe = config->fe;
i2c_set_clientdata(client, tuner_dev);
memcpy(&fe->ops.tuner_ops,
&vidtv_tuner_ops,
sizeof(struct dvb_tuner_ops));
memcpy(&tuner_dev->config, config, sizeof(tuner_dev->config));
fe->tuner_priv = client;
Reported by FlawFinder.