The following issues were found

libavcodec/ulti_cb.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 25 Column: 23 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

              #ifndef AVCODEC_ULTI_CB_H
#define AVCODEC_ULTI_CB_H

static const unsigned char ulti_codebook[16384]={
    0x00, 0x01, 0x01, 0x02,
    0x00, 0x01, 0x02, 0x03,
    0x00, 0x02, 0x03, 0x04,
    0x00, 0x01, 0x03, 0x04,
    0x00, 0x01, 0x02, 0x04,

            

Reported by FlawFinder.

libavcodec/utils.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 421 Column: 17 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                          av_memcpy_backptr(dst + 2, 2, bytes - 2);
            dst += frame->linesize[p];
            for (y = 1; y < height; y++) {
                memcpy(dst, frame->data[p], 2*bytes);
                dst += frame->linesize[p];
            }
        } else {
            for (y = 0; y < height; y++) {
                memset(dst, c[p], bytes);

            

Reported by FlawFinder.

libavcodec/v4l2_buffers.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 287 Column: 5 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                  length = out->plane_info[plane].length;
    bytesused = FFMIN(size+offset, length);

    memcpy((uint8_t*)out->plane_info[plane].mm_addr+offset, data, FFMIN(size, length-offset));

    if (V4L2_TYPE_IS_MULTIPLANAR(out->buf.type)) {
        out->planes[plane].bytesused = bytesused;
        out->planes[plane].length = length;
    } else {

            

Reported by FlawFinder.

libavcodec/v4l2_context.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 425 Column: 13 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                      avbuf->status = V4L2BUF_AVAILABLE;
        avbuf->buf = buf;
        if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) {
            memcpy(avbuf->planes, planes, sizeof(planes));
            avbuf->buf.m.planes = avbuf->planes;
        }
        return avbuf;
    }


            

Reported by FlawFinder.

libavcodec/v4l2_m2m.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 44 Column: 5 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

                      OFFSET(num_output_buffers), AV_OPT_TYPE_INT, { .i64 = 16 }, 6, INT_MAX, FLAGS }

typedef struct V4L2m2mContext {
    char devname[PATH_MAX];
    int fd;

    /* the codec context queues */
    V4L2Context capture;
    V4L2Context output;

            

Reported by FlawFinder.

libavcodec/vaapi_encode_h264.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 127 Column: 5 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                      return AVERROR(ENOSPC);
    }

    memcpy(data, au->data, au->data_size);
    *data_len = 8 * au->data_size - au->data_bit_padding;

    return 0;
}


            

Reported by FlawFinder.

libavcodec/vaapi_encode_mpeg2.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 86 Column: 5 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                      return AVERROR(ENOSPC);
    }

    memcpy(data, frag->data, frag->data_size);
    *data_len = 8 * frag->data_size - frag->data_bit_padding;

    return 0;
}


            

Reported by FlawFinder.

libavcodec/vaapi_encode_vp8.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 158 Column: 5 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                  for (i = 0; i < 5; i++)
        quant.quantization_index_delta[i] = 0;

    memcpy(data, &quant, sizeof(quant));
    return 0;
}

static av_cold int vaapi_encode_vp8_configure(AVCodecContext *avctx)
{

            

Reported by FlawFinder.

libavcodec/vdpau_hevc.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 442 Column: 5 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                  h265_raw_ptl->general_tier_flag     = general_ptl->tier_flag;
    h265_raw_ptl->general_profile_idc   = general_ptl->profile_idc;

    memcpy(h265_raw_ptl->general_profile_compatibility_flag,
                                  general_ptl->profile_compatibility_flag, 32 * sizeof(uint8_t));

#define copy_field(name) h265_raw_ptl->general_ ## name = general_ptl->name
    copy_field(progressive_source_flag);
    copy_field(interlaced_source_flag);

            

Reported by FlawFinder.

libavcodec/vmdaudio.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 219 Column: 17 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                                               avctx->channels);
                output_samples_s16 += avctx->block_align;
            } else {
                memcpy(output_samples_u8, buf, s->chunk_size);
                output_samples_u8  += avctx->block_align;
            }
            buf += s->chunk_size;
        }
    }

            

Reported by FlawFinder.