The following issues were found
libavdevice/dshow_pin.c
1 issues
Line: 114
Column: 5
CWE codes:
120
Suggestion:
Consider using a function version that stops copying at the end of the buffer
info->pFilter = (IBaseFilter *) this->filter;
info->dir = PINDIR_INPUT;
wcscpy(info->achName, L"Capture");
return S_OK;
}
long ff_dshow_pin_QueryDirection(DShowPin *this, PIN_DIRECTION *dir)
{
Reported by FlawFinder.
libavdevice/fbdev_dec.c
1 issues
Line: 196
Column: 9
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
pout = pkt->data;
for (i = 0; i < fbdev->height; i++) {
memcpy(pout, pin, fbdev->frame_linesize);
pin += fbdev->fixinfo.line_length;
pout += fbdev->frame_linesize;
}
return fbdev->frame_size;
Reported by FlawFinder.
libavdevice/fbdev_enc.c
1 issues
Line: 170
Column: 9
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
}
for (i = 0; i < disp_height; i++) {
memcpy(pout, pin, bytes_to_copy);
pout += fbdev->fixinfo.line_length;
pin += src_line_size;
}
return 0;
Reported by FlawFinder.
libavdevice/openal-dec.c
1 issues
Line: 117
Column: 41
CWE codes:
126
av_log(log_ctx, AV_LOG_INFO, "List of OpenAL capture devices on this system:\n");
for (; *devices != '\0'; devices += strlen(devices) + 1)
av_log(log_ctx, AV_LOG_INFO, " %s\n", devices);
}
static int read_header(AVFormatContext *ctx)
{
Reported by FlawFinder.
libavdevice/oss.c
1 issues
Line: 45
Column: 18
CWE codes:
807
20
Suggestion:
Check environment variables carefully before using them
OSSAudioData *s = s1->priv_data;
int audio_fd;
int tmp, err;
char *flip = getenv("AUDIO_FLIP_LEFT");
if (is_output)
audio_fd = avpriv_open(audio_device, O_WRONLY);
else
audio_fd = avpriv_open(audio_device, O_RDONLY);
Reported by FlawFinder.
libavdevice/oss_dec.c
1 issues
Line: 78
Column: 11
CWE codes:
120
20
if ((ret=av_new_packet(pkt, s->frame_size)) < 0)
return ret;
ret = read(s->fd, pkt->data, pkt->size);
if (ret <= 0){
av_packet_unref(pkt);
pkt->size = 0;
if (ret<0) return AVERROR(errno);
else return AVERROR_EOF;
Reported by FlawFinder.
libavdevice/oss_enc.c
1 issues
Line: 64
Column: 9
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
while (size > 0) {
len = FFMIN(OSS_AUDIO_BLOCK_SIZE - s->buffer_ptr, size);
memcpy(s->buffer + s->buffer_ptr, buf, len);
s->buffer_ptr += len;
if (s->buffer_ptr >= OSS_AUDIO_BLOCK_SIZE) {
for(;;) {
ret = write(s->fd, s->buffer, OSS_AUDIO_BLOCK_SIZE);
if (ret > 0)
Reported by FlawFinder.
libavdevice/pulse_audio_dec.c
1 issues
Line: 338
Column: 13
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
ret = AVERROR_EXTERNAL;
goto unlock_and_fail;
}
memcpy(pkt->data + pos, read_data, read_length);
pos += read_length;
pa_stream_drop(pd->stream);
}
}
Reported by FlawFinder.
libavdevice/sndio_enc.c
1 issues
Line: 55
Column: 9
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
while (size > 0) {
len = FFMIN(s->buffer_size - s->buffer_offset, size);
memcpy(s->buffer + s->buffer_offset, buf, len);
buf += len;
size -= len;
s->buffer_offset += len;
if (s->buffer_offset >= s->buffer_size) {
ret = sio_write(s->hdl, s->buffer, s->buffer_size);
Reported by FlawFinder.
libavdevice/v4l2enc.c
1 issues
Line: 42
Column: 13
CWE codes:
362
if (s1->flags & AVFMT_FLAG_NONBLOCK)
flags |= O_NONBLOCK;
s->fd = open(s1->url, flags);
if (s->fd < 0) {
res = AVERROR(errno);
av_log(s1, AV_LOG_ERROR, "Unable to open V4L2 device '%s'\n", s1->url);
return res;
}
Reported by FlawFinder.