The following issues were found

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

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

                  if (!fmts)
        return AVERROR(ENOMEM);

    memcpy(fmts, priv->pix_fmts, sizeof(*fmts) * (priv->nb_pix_fmts));
    *formats = fmts;

    return 0;
}


            

Reported by FlawFinder.

libavutil/hwcontext_vulkan.h
1 issues
access - This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition
Security

Line: 194 Column: 22 CWE codes: 362/367!
Suggestion: Set up the correct permissions (e.g., using setuid()) and try to open the file directly

                  /**
     * Updated after every barrier
     */
    VkAccessFlagBits access[AV_NUM_DATA_POINTERS];
    VkImageLayout layout[AV_NUM_DATA_POINTERS];

    /**
     * Synchronization semaphores. Must not be freed manually. Must be waited on
     * and signalled at every queue submission.

            

Reported by FlawFinder.

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

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

                  cnt -= 4;
    if (cnt > 0)
#endif
    memcpy(dst, src, cnt);
    c->in  = src + cnt;
    c->out = dst + cnt;
}

/**

            

Reported by FlawFinder.

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

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

              
    len &= 15;
    if (len > 0) {
        memcpy(c->state, src, len);
        c->state_pos = len;
    }
}

static inline uint64_t fmix(uint64_t k)

            

Reported by FlawFinder.

libavutil/tests/error.c
1 issues
printf - If format strings can be influenced by an attacker, they can be exploited
Security

Line: 21 Column: 8 CWE codes: 134
Suggestion: Use a constant for the format specification

              
#include "libavutil/error.c"

#undef printf

int main(void)
{
    int i;


            

Reported by FlawFinder.

libavutil/tests/file.c
1 issues
printf - If format strings can be influenced by an attacker, they can be exploited
Security

Line: 21 Column: 8 CWE codes: 134
Suggestion: Use a constant for the format specification

              
#include "libavutil/file.c"

#undef printf

int main(void)
{
    uint8_t *buf;
    size_t size;

            

Reported by FlawFinder.

libavutil/tests/hwdevice.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 129 Column: 11 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

              
static const struct {
    enum AVHWDeviceType type;
    const char *possible_devices[5];
} test_devices[] = {
    { AV_HWDEVICE_TYPE_CUDA,
      { "0", "1", "2" } },
    { AV_HWDEVICE_TYPE_DRM,
      { "/dev/dri/card0", "/dev/dri/card1",

            

Reported by FlawFinder.

libavutil/tests/log.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 53 Column: 9 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

                  }
    {
        int result;
        char buffer[4];
        result = call_log_format_line2("foo", NULL, 0);
        if(result != 3) {
            printf("Test NULL buffer failed.\n");
            return 1;
        }

            

Reported by FlawFinder.

libavutil/tests/opt.c
1 issues
vfprintf - If format strings can be influenced by an attacker, they can be exploited
Security

Line: 112 Column: 5 CWE codes: 134
Suggestion: Use a constant for the format specification

              
static void log_callback_help(void *ptr, int level, const char *fmt, va_list vl)
{
    vfprintf(stdout, fmt, vl);
}

int main(void)
{
    int i;

            

Reported by FlawFinder.

libavutil/tests/parseutils.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 240 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

              {
    static const char args[] = "?tag1=val1&tag2=val2&tag3=val3&tag41=value 41&tag42=random1";
    static const char *tags[] = {"tag1", "tag2", "tag3", "tag4", "tag41", "41", "random1"};
    char buff[16];
    int i;

    for (i = 0; i < FF_ARRAY_ELEMS(tags); ++i) {
        if (av_find_info_tag(buff, sizeof(buff), tags[i], args))
            printf("%d. %s found: %s\n", i, tags[i], buff);

            

Reported by FlawFinder.