Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/ffmpeg2theora-0.30/src/avinfo.c
Examining data/ffmpeg2theora-0.30/src/avinfo.h
Examining data/ffmpeg2theora-0.30/src/ffmpeg2theora.c
Examining data/ffmpeg2theora-0.30/src/ffmpeg2theora.h
Examining data/ffmpeg2theora-0.30/src/index.c
Examining data/ffmpeg2theora-0.30/src/index.h
Examining data/ffmpeg2theora-0.30/src/iso639.c
Examining data/ffmpeg2theora-0.30/src/iso639.h
Examining data/ffmpeg2theora-0.30/src/libswresample_compat.h
Examining data/ffmpeg2theora-0.30/src/subtitles.c
Examining data/ffmpeg2theora-0.30/src/subtitles.h
Examining data/ffmpeg2theora-0.30/src/theorautils.c
Examining data/ffmpeg2theora-0.30/src/theorautils.h

FINAL RESULTS:

data/ffmpeg2theora-0.30/src/avinfo.c:115:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(p_buffer, "%s%s", rep, p+strlen(orig));
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:451:7:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
      strcat(realloced_mb, allocated);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2081:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(stdout,
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2118:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(stdout,
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:3009:25:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                        sprintf(str_ptr, "%s", ext);
data/ffmpeg2theora-0.30/src/subtitles.c:48:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(frontend,format,ap);
data/ffmpeg2theora-0.30/src/subtitles.c:56:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr,format,ap);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2433:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while((c=getopt_long(argc,argv,optstring,options,&long_option_index))!=EOF) {
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2457:31:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                              srand (time (NULL));
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2458:37:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
                              tmp = getenv("TEMP");
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2459:47:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
                              if (!tmp) tmp = getenv("TMP");
data/ffmpeg2theora-0.30/src/theorautils.c:823:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand (time (NULL));
data/ffmpeg2theora-0.30/src/avinfo.c:75:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *file = fopen(filename, "rb");
data/ffmpeg2theora-0.30/src/avinfo.c:107:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  const char buffer[4096];
data/ffmpeg2theora-0.30/src/avinfo.c:172:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf1[32];
data/ffmpeg2theora-0.30/src/avinfo.c:351:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf1[32];
data/ffmpeg2theora-0.30/src/avinfo.c:411:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    file = fopen(filename, "rb");
data/ffmpeg2theora-0.30/src/avinfo.c:434:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char hash[32];
data/ffmpeg2theora-0.30/src/avinfo.c:436:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(hash,"%016I64x", gen_oshash(filename));
data/ffmpeg2theora-0.30/src/avinfo.c:438:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(hash,"%016llx", gen_oshash(filename));
data/ffmpeg2theora-0.30/src/avinfo.c:440:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(hash,"%016qx", gen_oshash(filename));
data/ffmpeg2theora-0.30/src/avinfo.c:512:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char inputfile_name[255];
data/ffmpeg2theora-0.30/src/avinfo.c:525:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        output = fopen(argv[2], "w");
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:497:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dupe, pkt->data, pkt->size);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:534:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char args[512];
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:576:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(this->filter_frame->data, src->data, sizeof(src->data));
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:577:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(this->filter_frame->linesize, src->linesize, sizeof(src->linesize));
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:1929:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char *argv[64];
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:1982:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int crop_value = atoi(arg);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2059:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char uc_key[16];
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2070:17:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
                strcpy(uc_key, "ARTIST");
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2317:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char outputfile_name[1024];
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2318:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char inputfile_name[1024];
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2415:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char pidfile_name[255] = { '\0' };
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2416:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char _tmp_2pass[1024] = { '\0' };
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2462:51:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                              info.twopass_file = fopen(_tmp_2pass,"wb+");
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2465:49:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
                            info.twopass_file = tmpfile();
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2475:49:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                            info.twopass_file = fopen(optarg,"wb");
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2484:49:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                            info.twopass_file = fopen(optarg,"rb");
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2555:29:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                            sprintf(info.oshash,"0000000000000000");
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2567:46:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                          info.speed_level = atoi(optarg);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2575:45:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                            info.frontend = fopen(optarg, "w");
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2615:67:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                                convert->max_y = convert->max_x = atoi(optarg);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2624:52:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                            convert->audiostream = atoi(optarg);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2628:52:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                            convert->videostream = atoi(optarg);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2638:51:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                            info.index_interval = atoi(optarg);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2642:57:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                            info.theora_index_reserve = atoi(optarg);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2646:57:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                            info.vorbis_index_reserve = atoi(optarg);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2650:55:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                            info.kate_index_reserve = atoi(optarg);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2741:40:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                convert->picture_width=atoi(optarg);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2744:41:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                convert->picture_height=atoi(optarg);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2789:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                convert->keyint = atoi(optarg);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2796:38:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                convert->buf_delay = atoi(optarg);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2799:38:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                convert->sample_rate=atoi(optarg);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2805:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                convert->channels=atoi(optarg);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2864:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                n = atoi(optarg);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2951:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fpid = fopen(pidfile_name, "w");
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2961:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[100];
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:3021:21:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                    sprintf(info.oshash,"%016I64x", gen_oshash(inputfile_name));
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:3023:21:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                    sprintf(info.oshash,"%016qx", gen_oshash(inputfile_name));
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:3033:40:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                        info.outfile = fopen(outputfile_name,"wb");
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:3040:36:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                    info.outfile = fopen(outputfile_name,"wb");
data/ffmpeg2theora-0.30/src/ffmpeg2theora.h:34:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char subtitles_language[16];
data/ffmpeg2theora-0.30/src/ffmpeg2theora.h:35:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char subtitles_category[16];
data/ffmpeg2theora-0.30/src/ffmpeg2theora.h:80:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char pp_mode[255];
data/ffmpeg2theora-0.30/src/ffmpeg2theora.h:120:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char y_lut[256];
data/ffmpeg2theora-0.30/src/ffmpeg2theora.h:121:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char uv_lut[256];
data/ffmpeg2theora-0.30/src/subtitles.c:399:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char text[4096];
data/ffmpeg2theora-0.30/src/subtitles.c:404:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char str[4096];
data/ffmpeg2theora-0.30/src/subtitles.c:416:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen(this->filename, "r");
data/ffmpeg2theora-0.30/src/subtitles.c:550:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(utf8copy, utf8, utf8len);
data/ffmpeg2theora-0.30/src/subtitles.c:628:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(subtitle->kb.pixels,sr->pict.data[0],sr->w*sr->h);
data/ffmpeg2theora-0.30/src/theorautils.c:238:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (op.packet, FISHEAD_IDENTIFIER, 8); /* identifier */
data/ffmpeg2theora-0.30/src/theorautils.c:288:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy (op.packet, FISBONE_IDENTIFIER, 8); /* identifier */
data/ffmpeg2theora-0.30/src/theorautils.c:299:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(op.packet+FISBONE_SIZE, theora_message_headers, strlen(theora_message_headers));
data/ffmpeg2theora-0.30/src/theorautils.c:317:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy (op.packet, FISBONE_IDENTIFIER, 8); /* identifier */
data/ffmpeg2theora-0.30/src/theorautils.c:327:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(op.packet+FISBONE_SIZE, vorbis_message_headers, strlen(vorbis_message_headers));
data/ffmpeg2theora-0.30/src/theorautils.c:342:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char name[32];
data/ffmpeg2theora-0.30/src/theorautils.c:349:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(name, "Name: %d\r\n", (n+1));
data/ffmpeg2theora-0.30/src/theorautils.c:355:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy (op.packet, FISBONE_IDENTIFIER, 8); /* identifier */
data/ffmpeg2theora-0.30/src/theorautils.c:365:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy (op.packet+FISBONE_SIZE, kate_message_headers, message_headers_len);
data/ffmpeg2theora-0.30/src/theorautils.c:366:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy (op.packet+FISBONE_SIZE+message_headers_len, name, name_len);
data/ffmpeg2theora-0.30/src/theorautils.c:403:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(op->packet, "index", 6);
data/ffmpeg2theora-0.30/src/theorautils.c:1129:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          static unsigned char buffer[80];
data/ffmpeg2theora-0.30/src/theorautils.c:1717:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(info->videopage, og.header, og.header_len);
data/ffmpeg2theora-0.30/src/theorautils.c:1718:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(info->videopage+og.header_len , og.body, og.body_len);
data/ffmpeg2theora-0.30/src/theorautils.c:1743:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(info->audiopage, og.header, og.header_len);
data/ffmpeg2theora-0.30/src/theorautils.c:1744:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(info->audiopage+og.header_len , og.body, og.body_len);
data/ffmpeg2theora-0.30/src/theorautils.c:1769:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(ks->katepage, og.header, og.header_len);
data/ffmpeg2theora-0.30/src/theorautils.c:1770:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(ks->katepage+og.header_len , og.body, og.body_len);
data/ffmpeg2theora-0.30/src/theorautils.h:76:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char oshash[32];
data/ffmpeg2theora-0.30/src/avinfo.c:109:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int len = strlen(str);
data/ffmpeg2theora-0.30/src/avinfo.c:110:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(p_buffer, str, len);
data/ffmpeg2theora-0.30/src/avinfo.c:112:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(p_buffer, p_str, p-p_str);
data/ffmpeg2theora-0.30/src/avinfo.c:114:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = len - strlen(orig) + strlen(rep);    
data/ffmpeg2theora-0.30/src/avinfo.c:114:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = len - strlen(orig) + strlen(rep);    
data/ffmpeg2theora-0.30/src/avinfo.c:115:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    sprintf(p_buffer, "%s%s", rep, p+strlen(orig));
data/ffmpeg2theora-0.30/src/avinfo.c:116:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    p_str = p + strlen(orig);
data/ffmpeg2theora-0.30/src/avinfo.c:117:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    p_buffer += strlen(rep);
data/ffmpeg2theora-0.30/src/avinfo.c:120:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(p, buffer, len);
data/ffmpeg2theora-0.30/src/avinfo.c:328:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(tag->value) && utf8_validate (tag->value, strlen(tag->value))) {
data/ffmpeg2theora-0.30/src/avinfo.c:328:62:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(tag->value) && utf8_validate (tag->value, strlen(tag->value))) {
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:443:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    n = strlen(allocated);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:448:59:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    realloced_mb = (char*)realloc(multiblock, (multiblock?strlen(multiblock):0) + strlen(allocated) + 2); /* \n + 0 */
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:448:83:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    realloced_mb = (char*)realloc(multiblock, (multiblock?strlen(multiblock):0) + strlen(allocated) + 2); /* \n + 0 */
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:450:23:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
      if (multiblock) strcat(realloced_mb, "\n"); else strcpy(realloced_mb, "");
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:450:56:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
      if (multiblock) strcat(realloced_mb, "\n"); else strcpy(realloced_mb, "");
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:507:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        *utf8len = strlen(*utf8);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:1739:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                utf8len = strlen(utf8);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:1751:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                              utf8len = strlen(utf8);
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2676:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                            if (strlen(optarg)>15) {
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:2683:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                            if (strlen(optarg)>15) {
data/ffmpeg2theora-0.30/src/ffmpeg2theora.c:3007:73:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    snprintf(outputfile_name, sizeof(outputfile_name) - strlen(ext), "%s",inputfile_name);
data/ffmpeg2theora-0.30/src/subtitles.c:96:5:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
    strcpy(ks->subtitles_language, "");
data/ffmpeg2theora-0.30/src/subtitles.c:97:5:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
    strcpy(ks->subtitles_category, "");
data/ffmpeg2theora-0.30/src/subtitles.c:111:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(ks->subtitles_category, category, 16);
data/ffmpeg2theora-0.30/src/subtitles.c:115:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ks->subtitles_language, language, 16);
data/ffmpeg2theora-0.30/src/subtitles.c:141:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(this->kate_streams[n].subtitles_language, language, 16);
data/ffmpeg2theora-0.30/src/subtitles.c:154:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(this->kate_streams[n].subtitles_category, category, 16);
data/ffmpeg2theora-0.30/src/subtitles.c:227:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        nbytes = strlen(text)+1;
data/ffmpeg2theora-0.30/src/subtitles.c:277:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t insz=strlen(text)+1;
data/ffmpeg2theora-0.30/src/subtitles.c:332:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *ptr = text+strlen(text)-1;
data/ffmpeg2theora-0.30/src/subtitles.c:354:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen(utf8);
data/ffmpeg2theora-0.30/src/subtitles.c:450:13:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
            strcpy(text,"");
data/ffmpeg2theora-0.30/src/subtitles.c:488:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t len=strlen(text);
data/ffmpeg2theora-0.30/src/subtitles.c:489:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (len+strlen(str) >= sizeof(text)) {
data/ffmpeg2theora-0.30/src/subtitles.c:492:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(text+len,str,sizeof(text)-len);
data/ffmpeg2theora-0.30/src/theorautils.c:282:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        packet_size = FISBONE_SIZE + strlen(theora_message_headers);
data/ffmpeg2theora-0.30/src/theorautils.c:299:64:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        memcpy(op.packet+FISBONE_SIZE, theora_message_headers, strlen(theora_message_headers));
data/ffmpeg2theora-0.30/src/theorautils.c:311:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        packet_size = FISBONE_SIZE + strlen(vorbis_message_headers);
data/ffmpeg2theora-0.30/src/theorautils.c:327:64:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        memcpy(op.packet+FISBONE_SIZE, vorbis_message_headers, strlen(vorbis_message_headers));
data/ffmpeg2theora-0.30/src/theorautils.c:345:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            int message_headers_len = strlen(kate_message_headers);
data/ffmpeg2theora-0.30/src/theorautils.c:350:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            name_len = strlen(name);

ANALYSIS SUMMARY:

Hits = 133
Lines analyzed = 7096 in approximately 0.29 seconds (24444 lines/second)
Physical Source Lines of Code (SLOC) = 5810
Hits@level = [0] 214 [1]  42 [2]  79 [3]   5 [4]   7 [5]   0
Hits@level+ = [0+] 347 [1+] 133 [2+]  91 [3+]  12 [4+]   7 [5+]   0
Hits/KSLOC@level+ = [0+] 59.7246 [1+] 22.8916 [2+] 15.6627 [3+] 2.0654 [4+] 1.20482 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.