The following issues were found

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

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

                                                      frag->data_size);
    if (!side_data)
        return AVERROR(ENOMEM);
    memcpy(side_data, frag->data, frag->data_size);

    ff_cbs_fragment_reset(frag);
    return 0;
}


            

Reported by FlawFinder.

libavcodec/cbs_sei.h
1 issues
read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 123 Column: 29 CWE codes: 120 20

                  // Size of the decomposed structure.
    size_t  size;
    // Read bitstream into SEI message.
    SEIMessageReadFunction  read;
    // Write bitstream from SEI message.
    SEIMessageWriteFunction write;
} SEIMessageTypeDescriptor;

// Macro for the read/write pair.  The clumsy cast is needed because the

            

Reported by FlawFinder.

libavcodec/cbs_vp9_syntax_template.c
1 issues
Using argument current that points at uninitialized variable sfi
Error

Line: 414 CWE codes: 908

              
    HEADER("Superframe Index");

    f(3, superframe_marker);
    f(2, bytes_per_framesize_minus_1);
    f(3, frames_in_superframe_minus_1);

    for (i = 0; i <= current->frames_in_superframe_minus_1; i++) {
        // Surprise little-endian!

            

Reported by Cppcheck.

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

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

                      uint8_t *dptr = &dbuf[doff];
        uint8_t *sptr = &sbuf[soff];

        memcpy(dptr, sptr, size);
        doff += dstride;
        soff += sstride;
    }

    return 0;

            

Reported by FlawFinder.

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

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

                          }
            if (x+3 >= avctx->width) {
                memset(luma_tmp, 0, sizeof(luma_tmp));
                memcpy(luma_tmp, luma, avctx->width - x);
                luma = luma_tmp;
            }
            put_bits(&pb, 5, (249*(luma[3] +  (dither>>29)   )) >> 11);
            put_bits(&pb, 5, (249*(luma[2] + ((dither>>26)&7))) >> 11);
            put_bits(&pb, 5, (249*(luma[1] + ((dither>>23)&7))) >> 11);

            

Reported by FlawFinder.

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

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

                                         gains_ptr->now[i], gains_ptr->now[i + 1]);

    /* Save away the current to be previous block. */
    memcpy(previous_buffer, buffer0,
           q->samples_per_channel * sizeof(*previous_buffer));
}


/**

            

Reported by FlawFinder.

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

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

                      }

        for (sY = 0; sY < height; dY++, sY++) {
            memcpy(&(dst[dY * dStride]), &(src[sY * sStride]), bwidth);
            dY++;
        }
    } else {
        av_image_copy_plane(dst, dStride, src, sStride, bwidth, height);
    }

            

Reported by FlawFinder.

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

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

                  uint8_t *dst = f->data[0];
    dst += (height - 1) * f->linesize[0];
    for (i = height; i; i--) {
        memcpy(dst, src, linelen);
        src += src_stride;
        dst -= f->linesize[0];
    }
}


            

Reported by FlawFinder.

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

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

                  }

    if (extradata_size > 0)
        memcpy(ctx->cuparse_ext->raw_seqhdr_data, extradata, extradata_size);
    ctx->cuparse_ext->format.seqhdr_data_length = extradata_size;

    ctx->cuparseinfo.pExtVideoInfo = ctx->cuparse_ext;

    ctx->key_frame = av_mallocz(ctx->nb_surfaces * sizeof(int));

            

Reported by FlawFinder.

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

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

                      y_plane += frame->linesize[0] * s->height;
        for (stream_ptr = 0; stream_ptr < rawsize; stream_ptr += linesize) {
            y_plane -= frame->linesize[0];
            memcpy(y_plane, buf+stream_ptr, linesize);
        }
    } else {

    /* iterate through each line in the height */
    for (y_ptr = 0, u_ptr = 0, v_ptr = 0;

            

Reported by FlawFinder.