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/dia2code-0.8.3/runtime/cpp/p_orb.h
Examining data/dia2code-0.8.3/acconfig.h
Examining data/dia2code-0.8.3/dia2code/decls.c
Examining data/dia2code-0.8.3/dia2code/decls.h
Examining data/dia2code-0.8.3/dia2code/generate_code_python.c
Examining data/dia2code-0.8.3/dia2code/generate_code_csharp.c
Examining data/dia2code-0.8.3/dia2code/code_generators.h
Examining data/dia2code-0.8.3/dia2code/generate_code_c.c
Examining data/dia2code-0.8.3/dia2code/generate_code_ada.c
Examining data/dia2code-0.8.3/dia2code/generate_code_cpp.c
Examining data/dia2code-0.8.3/dia2code/generate_code_idl.c
Examining data/dia2code-0.8.3/dia2code/generate_code_php.c
Examining data/dia2code-0.8.3/dia2code/generate_code_shp.c
Examining data/dia2code-0.8.3/dia2code/generate_code_sql.c
Examining data/dia2code-0.8.3/dia2code/scan_tree.c
Examining data/dia2code-0.8.3/dia2code/generate_code_php_five.c
Examining data/dia2code-0.8.3/dia2code/main.c
Examining data/dia2code-0.8.3/dia2code/parse_diagram.c
Examining data/dia2code-0.8.3/dia2code/parse_diagram.h
Examining data/dia2code-0.8.3/dia2code/generate_code_java.c
Examining data/dia2code-0.8.3/dia2code/includes.c
Examining data/dia2code-0.8.3/dia2code/includes.h
Examining data/dia2code-0.8.3/dia2code/dia2code.c
Examining data/dia2code-0.8.3/dia2code/dia2code.h
Examining data/dia2code-0.8.3/dia2code/generate_code_ruby.c

FINAL RESULTS:

data/dia2code-0.8.3/dia2code/dia2code.c:211:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf (str, 4096, first_arg, vargu); \
data/dia2code-0.8.3/dia2code/dia2code.c:280:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (outfilename, "%s/%s", b->outdir, filename);
data/dia2code-0.8.3/dia2code/dia2code.c:393:5:  [4] (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).
    strcpy(d2ci->name, name);
data/dia2code-0.8.3/dia2code/dia2code.c:438:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(nm, "%s.%s", section, name);
data/dia2code-0.8.3/dia2code/dia2code.c:566:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(d2c_mangle_name, "%s@%s@@", op->key.attr.name, op->key.attr.type);
data/dia2code-0.8.3/dia2code/dia2code.c:570:9:  [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(d2c_mangle_name, params->key.type);
data/dia2code-0.8.3/dia2code/dia2code.c:589:5:  [4] (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).
    strcpy(backup_filename, filename);
data/dia2code-0.8.3/dia2code/dia2code.c:708:11:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    cnt = vsprintf(d2c_fprintf_buf, fmt, argptr);
data/dia2code-0.8.3/dia2code/dia2code.h:230:21:  [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.
#define d2c_fprintf fprintf
data/dia2code-0.8.3/dia2code/generate_code_ada.c:112:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (buf, "CORBA.%s", nospc (strtoupperfirst (name)));
data/dia2code-0.8.3/dia2code/generate_code_ada.c:115:9:  [4] (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).
        strcpy (buf, name);
data/dia2code-0.8.3/dia2code/generate_code_ada.c:191:13:  [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 (buf, pkglist->key->name);
data/dia2code-0.8.3/dia2code/generate_code_ada.c:196:5:  [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 (buf, node->key->name);
data/dia2code-0.8.3/dia2code/generate_code_ada.c:284:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (parentname, "%s.Object", parent->key->name);
data/dia2code-0.8.3/dia2code/generate_code_ada.c:517:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf (swname, "%s", sw->key.name);
data/dia2code-0.8.3/dia2code/generate_code_ada.c:558:13:  [4] (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).
            strcpy (dim, umla->key.value);
data/dia2code-0.8.3/dia2code/generate_code_ada.c:598:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (outfname, "%s.%s", filebase, body_file_ext);
data/dia2code-0.8.3/dia2code/generate_code_ada.c:600:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (outfname, "%s.%s", filebase, file_ext);
data/dia2code-0.8.3/dia2code/generate_code_ada.c:646:13:  [4] (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).
            strcpy (basename, name);
data/dia2code-0.8.3/dia2code/generate_code_ada.c:650:13:  [4] (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).
            strcpy (basename, name);
data/dia2code-0.8.3/dia2code/generate_code_ada.c:654:17:  [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 (basename, PACKAGE_EXT);
data/dia2code-0.8.3/dia2code/generate_code_c.c:63:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(outfilename, "%s/%s.h", b->outdir, tmpname);
data/dia2code-0.8.3/dia2code/generate_code_c.c:80:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(outfilename, "%s/%s.c", b->outdir, tmpname);
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:128:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf (buf, "CORBA::%s", strtoupperfirst (name));
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:138:13:  [4] (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).
            strcpy (buf, name);
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:141:9:  [4] (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).
        strcpy (buf, name);
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:158:13:  [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 (buf, pkglist->key->name);
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:163:5:  [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 (buf, node->key->name);
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:590:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (filename, "%s.%s", name, file_ext);
data/dia2code-0.8.3/dia2code/generate_code_csharp.c:31:9:  [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 (buf, pkg->key->name);
data/dia2code-0.8.3/dia2code/generate_code_csharp.c:62:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (outfilename, "%s.cs", tmplist->key->name);
data/dia2code-0.8.3/dia2code/generate_code_idl.c:366:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (filename, "%s.%s", name, file_ext);
data/dia2code-0.8.3/dia2code/generate_code_java.c:125:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(outfilename, "%s/%s.java", b->outdir, tmplist->key->name);
data/dia2code-0.8.3/dia2code/generate_code_php.c:65:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(outfilename, "%s/%s.php", b->outdir, tmplist->key->name);
data/dia2code-0.8.3/dia2code/generate_code_php.c:263:21:  [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(outfile, TABS);
data/dia2code-0.8.3/dia2code/generate_code_php_five.c:129: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(outfile, TABS);
data/dia2code-0.8.3/dia2code/generate_code_php_five.c:366:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(outfilename, "%s/%s.php", b->outdir, tmplist->key->name);
data/dia2code-0.8.3/dia2code/generate_code_php_five.c:411:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(outfilename, "%s/%s.php", b->outdir, tmplist->key->name);
data/dia2code-0.8.3/dia2code/generate_code_python.c:62:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(outfilename, "%s/%s.py", b->outdir, tmplist->key->name);
data/dia2code-0.8.3/dia2code/generate_code_ruby.c:74:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(outfilename, "%s/%s.class.rb", b->outdir, pretty_outfilename);
data/dia2code-0.8.3/dia2code/generate_code_ruby.c:259:21:  [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(outfile, TABS);
data/dia2code-0.8.3/dia2code/generate_code_ruby.c:330:21:  [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(outfile, TABS);
data/dia2code-0.8.3/dia2code/generate_code_shp.c:63:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(outfilename, "%s/createshapefiles.bat", b->outdir);
data/dia2code-0.8.3/dia2code/generate_code_sql.c:66:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(outfilename, "%s/DEFINITION.SQL", b->outdir);
data/dia2code-0.8.3/dia2code/main.c:43:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(modulename, "%s%s", DSO_PREFIX, lang);
data/dia2code-0.8.3/dia2code/main.c:47:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(modulepath, "%s/%s/%s%s", homedir, MODULE_DIR, modulename, DSO_SUFFIX);
data/dia2code-0.8.3/dia2code/main.c:252:17:  [4] (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).
                strcpy(inifile, getenv("HOME"));
data/dia2code-0.8.3/dia2code/main.c:338:13:  [4] (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).
            strcpy(value, (char *)cmd->ref);
data/dia2code-0.8.3/dia2code/main.c:36:15:  [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.
    homedir = getenv("HOME");
data/dia2code-0.8.3/dia2code/main.c:249:17:  [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 (getenv("HOME") == NULL)
data/dia2code-0.8.3/dia2code/main.c:252:33:  [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.
                strcpy(inifile, getenv("HOME"));
data/dia2code-0.8.3/dia2code/decls.c:168: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 (d->u.this_class, node, sizeof(umlclassnode));
data/dia2code-0.8.3/dia2code/dia2code.c:193:11:  [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 spcbuf[132];
data/dia2code-0.8.3/dia2code/dia2code.c:209: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 str[4096]; \
data/dia2code-0.8.3/dia2code/dia2code.c:262: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 outfilename[512];
data/dia2code-0.8.3/dia2code/dia2code.c:281: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).
    o = fopen (outfilename, "r");
data/dia2code-0.8.3/dia2code/dia2code.c:286: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).
    o = fopen (outfilename, "w");
data/dia2code-0.8.3/dia2code/dia2code.c:365: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 name[128];
data/dia2code-0.8.3/dia2code/dia2code.c:435: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 nm[LARGE_BUFFER];
data/dia2code-0.8.3/dia2code/dia2code.c:492: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 s[HUGE_BUFFER];
data/dia2code-0.8.3/dia2code/dia2code.c:493: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 s_comment[SMALL_BUFFER], s_dbl_hash[SMALL_BUFFER], s_implementation[SMALL_BUFFER],
data/dia2code-0.8.3/dia2code/dia2code.c:562: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 d2c_mangle_name[LARGE_BUFFER];
data/dia2code-0.8.3/dia2code/dia2code.c:590:5:  [2] (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 string.
    strcat(backup_filename, ".bak");
data/dia2code-0.8.3/dia2code/dia2code.c:698:1:  [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 d2c_fprintf_buf[HUGE_BUFFER * 2];
data/dia2code-0.8.3/dia2code/dia2code.h:44: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 name[80];
data/dia2code-0.8.3/dia2code/dia2code.h:45: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 value[80];
data/dia2code-0.8.3/dia2code/dia2code.h:46: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 type [80];
data/dia2code-0.8.3/dia2code/dia2code.h:47: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 comment [80];
data/dia2code-0.8.3/dia2code/dia2code.h:76:2:  [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[80];
data/dia2code-0.8.3/dia2code/dia2code.h:77:2:  [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 type[80];
data/dia2code-0.8.3/dia2code/dia2code.h:101: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 id[80];
data/dia2code-0.8.3/dia2code/dia2code.h:102: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 name[80];
data/dia2code-0.8.3/dia2code/dia2code.h:116: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 id[80];
data/dia2code-0.8.3/dia2code/dia2code.h:117: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 name[80];
data/dia2code-0.8.3/dia2code/dia2code.h:118: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 stereotype[80];
data/dia2code-0.8.3/dia2code/dia2code.h:119: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 comment[80];
data/dia2code-0.8.3/dia2code/dia2code.h:131:2:  [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[80];
data/dia2code-0.8.3/dia2code/generate_code_ada.c:97: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 buf[80];
data/dia2code-0.8.3/dia2code/generate_code_ada.c:117:13:  [2] (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 string.
            strcat (buf, ".Value_Ref");
data/dia2code-0.8.3/dia2code/generate_code_ada.c:183: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 buf[256];
data/dia2code-0.8.3/dia2code/generate_code_ada.c:199:13:  [2] (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 string.
            strcat (buf, ".Value_Ref");
data/dia2code-0.8.3/dia2code/generate_code_ada.c:201:13:  [2] (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 string.
            strcat (buf, ".Object");
data/dia2code-0.8.3/dia2code/generate_code_ada.c:267: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 parentname[80];
data/dia2code-0.8.3/dia2code/generate_code_ada.c:288:9:  [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 (parentname, "CORBA.Value.Base");
data/dia2code-0.8.3/dia2code/generate_code_ada.c:509: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 swname[80];
data/dia2code-0.8.3/dia2code/generate_code_ada.c:515: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 (swname, "Switch");
data/dia2code-0.8.3/dia2code/generate_code_ada.c:538: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 dim[80];
data/dia2code-0.8.3/dia2code/generate_code_ada.c:593: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 outfname[256];
data/dia2code-0.8.3/dia2code/generate_code_ada.c:621:23:  [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).
        licensefile = fopen (b->license, "r");
data/dia2code-0.8.3/dia2code/generate_code_ada.c:640: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, basename[256];
data/dia2code-0.8.3/dia2code/generate_code_c.c:27: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 outfilename[256];
data/dia2code-0.8.3/dia2code/generate_code_c.c:43:23:  [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).
        licensefile = fopen(b->license, "r");
data/dia2code-0.8.3/dia2code/generate_code_c.c:64:25:  [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).
            dummyfile = fopen(outfilename, "r");
data/dia2code-0.8.3/dia2code/generate_code_c.c:67:28:  [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).
                outfileh = fopen(outfilename, "w");
data/dia2code-0.8.3/dia2code/generate_code_c.c:81:30:  [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).
                outfilecpp = fopen(outfilename, "w");
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:117: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 buf[80];
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:130: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 (buf, "CORBA::LongLong");
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:132: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 (buf, "CORBA::UShort");
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:134: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 (buf, "CORBA::ULong");
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:136: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 (buf, "CORBA::ULongLong");
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:150: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 buf[256];
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:159:13:  [2] (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 string.
            strcat (buf, "::");
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:565:23:  [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).
        licensefile = fopen (b->license, "r");
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:583: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 filename[256];
data/dia2code-0.8.3/dia2code/generate_code_csharp.c:27: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 buf[512];
data/dia2code-0.8.3/dia2code/generate_code_csharp.c:45:23:  [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).
        licensefile = fopen (b->license, "r"); 
data/dia2code-0.8.3/dia2code/generate_code_csharp.c:54: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 outfilename[90];
data/dia2code-0.8.3/dia2code/generate_code_idl.c:337:23:  [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).
        licensefile = fopen(b->license, "r");
data/dia2code-0.8.3/dia2code/generate_code_idl.c:358: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 filename[256];
data/dia2code-0.8.3/dia2code/generate_code_java.c: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 outfilename[90];
data/dia2code-0.8.3/dia2code/generate_code_java.c:103:23:  [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).
        licensefile = fopen(b->license, "r");
data/dia2code-0.8.3/dia2code/generate_code_java.c:127:25:  [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).
            dummyfile = fopen(outfilename, "r");
data/dia2code-0.8.3/dia2code/generate_code_java.c:139:27:  [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).
                outfile = fopen(outfilename, "w");
data/dia2code-0.8.3/dia2code/generate_code_php.c:30: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 outfilename[90];
data/dia2code-0.8.3/dia2code/generate_code_php.c:45:23:  [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).
        licensefile = fopen(b->license, "r");
data/dia2code-0.8.3/dia2code/generate_code_php.c:66:25:  [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).
            dummyfile = fopen(outfilename, "r");
data/dia2code-0.8.3/dia2code/generate_code_php.c:69:27:  [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).
                outfile = fopen(outfilename, "w");
data/dia2code-0.8.3/dia2code/generate_code_php_five.c:361: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 outfilename[maxlen+2];
data/dia2code-0.8.3/dia2code/generate_code_php_five.c:367:19:  [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 *dummy = fopen(outfilename, "r");
data/dia2code-0.8.3/dia2code/generate_code_php_five.c:369:19:  [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).
        outfile = fopen(outfilename, "w");
data/dia2code-0.8.3/dia2code/generate_code_php_five.c:382: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 outfilename[90];
data/dia2code-0.8.3/dia2code/generate_code_php_five.c:395:23:  [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).
        licensefile = fopen(b->license, "r");
data/dia2code-0.8.3/dia2code/generate_code_php_five.c:412:25:  [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).
            dummyfile = fopen(outfilename, "r");
data/dia2code-0.8.3/dia2code/generate_code_php_five.c:415:27:  [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).
                outfile = fopen(outfilename, "w");
data/dia2code-0.8.3/dia2code/generate_code_python.c:26: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 outfilename[90];
data/dia2code-0.8.3/dia2code/generate_code_python.c:42:23:  [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).
        licensefile = fopen(b->license, "r");
data/dia2code-0.8.3/dia2code/generate_code_python.c:63:25:  [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).
            dummyfile = fopen(outfilename, "r");
data/dia2code-0.8.3/dia2code/generate_code_python.c:66:27:  [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).
                outfile = fopen(outfilename, "w");
data/dia2code-0.8.3/dia2code/generate_code_ruby.c:37: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 outfilename[90];
data/dia2code-0.8.3/dia2code/generate_code_ruby.c:52:23:  [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).
        licensefile = fopen(b->license, "r");
data/dia2code-0.8.3/dia2code/generate_code_ruby.c:76:25:  [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).
            dummyfile = fopen(outfilename, "r");
data/dia2code-0.8.3/dia2code/generate_code_ruby.c:80:27:  [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).
                outfile = fopen(outfilename, "w");
data/dia2code-0.8.3/dia2code/generate_code_shp.c:37: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 outfilename[256];
data/dia2code-0.8.3/dia2code/generate_code_shp.c:64:25:  [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).
            dummyfile = fopen(outfilename, "r");
data/dia2code-0.8.3/dia2code/generate_code_shp.c:67:30:  [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).
                outfileshp = fopen(outfilename, "a");
data/dia2code-0.8.3/dia2code/generate_code_shp.c:134:5:  [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(umla->key.type, "arc");
data/dia2code-0.8.3/dia2code/generate_code_sql.c:44: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 outfilename[256];
data/dia2code-0.8.3/dia2code/generate_code_sql.c:67:17:  [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).
    dummyfile = fopen(outfilename, "r");
data/dia2code-0.8.3/dia2code/generate_code_sql.c:69:22:  [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).
        outfilesql = fopen(outfilename, "w"); /* Moved this one to be able to OVERWRITE old file, changed from "a" to "w"... */
data/dia2code-0.8.3/dia2code/main.c:79: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 inifile[HUGE_BUFFER];
data/dia2code-0.8.3/dia2code/main.c:250: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(inifile, "c:");
data/dia2code-0.8.3/dia2code/main.c:253:13:  [2] (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 string.
            strcat(inifile, "\\dia2code\\dia2code.ini");
data/dia2code-0.8.3/dia2code/main.c:255:13:  [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(inifile, "~/.dia2code/dia2code.ini");
data/dia2code-0.8.3/dia2code/main.c:334:34:  [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 *)(cmd->ref) = atoi(value);
data/dia2code-0.8.3/dia2code/main.c:378:15:  [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 *f = fopen(filename, "r");
data/dia2code-0.8.3/dia2code/main.c:381: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 s[HUGE_BUFFER];
data/dia2code-0.8.3/dia2code/parse_diagram.c:81:9:  [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(tmp->name, "unnamed");
data/dia2code-0.8.3/dia2code/parse_diagram.c:280: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(parameter->key.name, "value");
data/dia2code-0.8.3/dia2code/parse_diagram.c:290: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(operation->key.implementation, "    ");
data/dia2code-0.8.3/dia2code/parse_diagram.c:292:13:  [2] (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 string.
            strcat(operation->key.implementation, " = value;");
data/dia2code-0.8.3/dia2code/parse_diagram.c:295: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(operation->key.attr.name, "set");
data/dia2code-0.8.3/dia2code/parse_diagram.c:302: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(operation->key.attr.type, "void");
data/dia2code-0.8.3/dia2code/parse_diagram.c:312:17:  [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(operation->key.attr.name, "is");
data/dia2code-0.8.3/dia2code/parse_diagram.c:314:17:  [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(operation->key.attr.name, "get");
data/dia2code-0.8.3/dia2code/parse_diagram.c:320: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(operation->key.implementation, "    return ");
data/dia2code-0.8.3/dia2code/parse_diagram.c:498:9:  [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(interface->key->id, "00");
data/dia2code-0.8.3/dia2code/parse_diagram.c:500:9:  [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(interface->key->stereotype, "Interface");
data/dia2code-0.8.3/dia2code/dia2code.c:32: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(tmp);
data/dia2code-0.8.3/dia2code/dia2code.c:50: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(tmp);
data/dia2code-0.8.3/dia2code/dia2code.c:69: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(tmp);
data/dia2code-0.8.3/dia2code/dia2code.c:115: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(list->name)) && (2 <= len <= strlen(name))
data/dia2code-0.8.3/dia2code/dia2code.c:115:57:  [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(list->name)) && (2 <= len <= strlen(name))
data/dia2code-0.8.3/dia2code/dia2code.c:119:68:  [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 ( mask == list->name && ! strcmp(list->name+1, name+strlen(name)-len) ) {
data/dia2code-0.8.3/dia2code/dia2code.c:270: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).
    tmpdirlgth = strlen (b->outdir);
data/dia2code-0.8.3/dia2code/dia2code.c:271:19:  [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).
    tmpfilelgth = strlen (filename);
data/dia2code-0.8.3/dia2code/dia2code.c:508:17:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
        count = sscanf(s, " %80s %80s %80s %80s %80s %8192s %8192s",
data/dia2code-0.8.3/dia2code/dia2code.c:569:9:  [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.
        strcat(d2c_mangle_name, "@");
data/dia2code-0.8.3/dia2code/dia2code.c:588: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).
    char *backup_filename = my_malloc(strlen(filename) + 4);
data/dia2code-0.8.3/dia2code/generate_code_ada.c:68: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).
    if (strlen (st) == 0)
data/dia2code-0.8.3/dia2code/generate_code_ada.c:132:30:  [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 use_procedure = (strlen (umlo->key.attr.type) == 0 ||
data/dia2code-0.8.3/dia2code/generate_code_ada.c:192:13:  [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.
            strcat (buf, ".");
data/dia2code-0.8.3/dia2code/generate_code_ada.c:439: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).
    if (strlen (stype) == 0) {
data/dia2code-0.8.3/dia2code/generate_code_ada.c:452: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 (umla->key.name) > 0)
data/dia2code-0.8.3/dia2code/generate_code_ada.c:464: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).
            if (strlen (umla->key.type) > 0)
data/dia2code-0.8.3/dia2code/generate_code_ada.c:482: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).
            if (strlen (umla->key.value) > 0)
data/dia2code-0.8.3/dia2code/generate_code_ada.c:514: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 (sw->key.name) == 0)
data/dia2code-0.8.3/dia2code/generate_code_ada.c:553: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 (umla->key.name) > 0)  {
data/dia2code-0.8.3/dia2code/generate_code_ada.c:669:26:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            while ((lc = fgetc (licensefile)) != EOF)
data/dia2code-0.8.3/dia2code/generate_code_c.c:37: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).
    tmpdirlgth = strlen(b->outdir);
data/dia2code-0.8.3/dia2code/generate_code_c.c:57:27:  [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).
            tmpfilelgth = strlen(tmpname);
data/dia2code-0.8.3/dia2code/generate_code_c.c:74:31:  [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).
                tmpfilelgth = strlen(tmpname);
data/dia2code-0.8.3/dia2code/generate_code_c.c:91:33:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    while((lc = fgetc(licensefile)) != EOF){
data/dia2code-0.8.3/dia2code/generate_code_c.c:120: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).
                if ( strlen(tmplist->key->stereotype) > 0 ) {
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:68: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).
    if (strlen (st) == 0)
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:88: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).
    if (strlen (st) == 0)
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:165:9:  [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.
        strcat (buf, "*");
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:197: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).
    if (strlen (stype) > 0) {
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:302: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 (strlen(umla->key.comment)) {
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:336:5:  [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(umlo->key.attr.comment)) {
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:360: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).
            if (strlen (umlo->key.attr.type) > 0) {
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:444: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).
    if (strlen (stype) == 0) {
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:457: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 (umla->key.name) > 0)
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:469: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).
            if (strlen (umla->key.type) > 0)
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:486: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).
            if (strlen (umla->key.value) > 0)
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:535: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 (umla->key.name) > 0)  {
data/dia2code-0.8.3/dia2code/generate_code_cpp.c:602:26:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            while ((lc = fgetc (licensefile)) != EOF)
data/dia2code-0.8.3/dia2code/generate_code_csharp.c:34:13:  [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.
            strcat (buf, ".");
data/dia2code-0.8.3/dia2code/generate_code_csharp.c:74:26:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            while ((lc = fgetc (licensefile)) != EOF)
data/dia2code-0.8.3/dia2code/generate_code_csharp.c:225: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 (strlen (umlo->key.attr.type) > 0) {
data/dia2code-0.8.3/dia2code/generate_code_idl.c:56: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 (umlo->key.attr.type) > 0)
data/dia2code-0.8.3/dia2code/generate_code_idl.c:167: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).
    if (strlen (stype) == 0) {
data/dia2code-0.8.3/dia2code/generate_code_idl.c:180: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 (umla->key.name) > 0)
data/dia2code-0.8.3/dia2code/generate_code_idl.c:191: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).
            if (strlen (umla->key.type) > 0)
data/dia2code-0.8.3/dia2code/generate_code_idl.c:220: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 (sw->key.name) > 0 && !eq (sw->key.name, "switch")) {
data/dia2code-0.8.3/dia2code/generate_code_idl.c:249: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).
        if (umla->key.name != NULL && strlen (umla->key.name) > 0)  {
data/dia2code-0.8.3/dia2code/generate_code_idl.c:383:26:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            while ((lc = fgetc (licensefile)) != EOF)
data/dia2code-0.8.3/dia2code/generate_code_java.c:96: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).
    tmpdirlgth = strlen(b->outdir);
data/dia2code-0.8.3/dia2code/generate_code_java.c:118:27:  [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).
            tmpfilelgth = strlen(tmpname);
data/dia2code-0.8.3/dia2code/generate_code_java.c:153:33:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    while((lc = fgetc(licensefile)) != EOF)
data/dia2code-0.8.3/dia2code/generate_code_java.c:301:25:  [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(umlo->key.attr.type) > 0)
data/dia2code-0.8.3/dia2code/generate_code_php.c:39: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).
    tmpdirlgth = strlen(b->outdir);
data/dia2code-0.8.3/dia2code/generate_code_php.c:59:27:  [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).
            tmpfilelgth = strlen(tmpname);
data/dia2code-0.8.3/dia2code/generate_code_php.c:82:33:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    while((lc = fgetc(licensefile)) != EOF){
data/dia2code-0.8.3/dia2code/generate_code_php.c:233:25:  [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(umlo->key.attr.type) > 0) {
data/dia2code-0.8.3/dia2code/generate_code_php_five.c:101: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).
    if (strlen(umlo->key.attr.type) > 0) {
data/dia2code-0.8.3/dia2code/generate_code_php_five.c:246:18:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((lc = fgetc(licensefile)) != EOF) {
data/dia2code-0.8.3/dia2code/generate_code_php_five.c:362:23:  [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 tmpfilelgth = strlen(tmplist->key->name);
data/dia2code-0.8.3/dia2code/generate_code_php_five.c:363:23:  [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 (tmpfilelgth + strlen(b->outdir) > maxlen) {
data/dia2code-0.8.3/dia2code/generate_code_php_five.c:389: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).
    tmpdirlgth = strlen(b->outdir);
data/dia2code-0.8.3/dia2code/generate_code_php_five.c:406:27:  [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).
            tmpfilelgth = strlen(tmpname);
data/dia2code-0.8.3/dia2code/generate_code_python.c:36: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).
    tmpdirlgth = strlen(b->outdir);
data/dia2code-0.8.3/dia2code/generate_code_python.c:56:27:  [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).
            tmpfilelgth = strlen(tmpname);
data/dia2code-0.8.3/dia2code/generate_code_python.c:76:33:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    while((lc = fgetc(licensefile)) != EOF){
data/dia2code-0.8.3/dia2code/generate_code_ruby.c:46: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).
    tmpdirlgth = strlen(b->outdir);
data/dia2code-0.8.3/dia2code/generate_code_ruby.c:67:27:  [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).
            tmpfilelgth = strlen(tmpname);
data/dia2code-0.8.3/dia2code/generate_code_ruby.c:90:33:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    while((lc = fgetc(licensefile)) != EOF){
data/dia2code-0.8.3/dia2code/generate_code_ruby.c:174:26:  [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(tmplist->key->comment) > 0 ) {
data/dia2code-0.8.3/dia2code/generate_code_ruby.c:226:26:  [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(umla->key.comment) > 0 ) {
data/dia2code-0.8.3/dia2code/generate_code_ruby.c:288:26:  [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(umlo->key.attr.comment) > 0 ) {
data/dia2code-0.8.3/dia2code/generate_code_ruby.c:317:25:  [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(umlo->key.attr.type) > 0) {
data/dia2code-0.8.3/dia2code/generate_code_ruby.c:324:29:  [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(parama->key.comment) > 0)
data/dia2code-0.8.3/dia2code/generate_code_shp.c:46: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).
    tmpdirlgth = strlen(b->outdir);
data/dia2code-0.8.3/dia2code/generate_code_shp.c:57:27:  [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).
            tmpfilelgth = strlen(tmpname);
data/dia2code-0.8.3/dia2code/generate_code_shp.c:74:31:  [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).
                tmpfilelgth = strlen(tmpname);
data/dia2code-0.8.3/dia2code/generate_code_sql.c:53: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).
    tmpdirlgth = strlen(b->outdir);
data/dia2code-0.8.3/dia2code/generate_code_sql.c:60:19:  [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).
    tmpfilelgth = strlen(tmpname);
data/dia2code-0.8.3/dia2code/generate_code_sql.c:76:23:  [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).
        tmpfilelgth = strlen(tmpname);
data/dia2code-0.8.3/dia2code/main.c:42: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).
    modulename = (char*)malloc(strlen(DSO_PREFIX) + strlen(lang) + 1);
data/dia2code-0.8.3/dia2code/main.c:42:53:  [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).
    modulename = (char*)malloc(strlen(DSO_PREFIX) + strlen(lang) + 1);
data/dia2code-0.8.3/dia2code/main.c:45: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).
    modulepath = (char*)malloc(strlen(homedir) + strlen(modulename)
data/dia2code-0.8.3/dia2code/main.c:45:50:  [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).
    modulepath = (char*)malloc(strlen(homedir) + strlen(modulename)
data/dia2code-0.8.3/dia2code/main.c:46:34:  [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).
                               + strlen(MODULE_DIR) + strlen(DSO_SUFFIX) + 3);
data/dia2code-0.8.3/dia2code/main.c:46:55:  [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).
                               + strlen(MODULE_DIR) + strlen(DSO_SUFFIX) + 3);
data/dia2code-0.8.3/dia2code/main.c:408: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).
            slen = strlen(param) - 1;
data/dia2code-0.8.3/dia2code/parse_diagram.c:281:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(parameter->key.type, attrlist->key.type, 79);
data/dia2code-0.8.3/dia2code/parse_diagram.c:291:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
            strncat(operation->key.implementation, attrlist->key.name, 76);
data/dia2code-0.8.3/dia2code/parse_diagram.c:296:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
            strncat(operation->key.attr.name, tmpname, 76);
data/dia2code-0.8.3/dia2code/parse_diagram.c:316:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
            strncat(operation->key.attr.name, tmpname, 76);
data/dia2code-0.8.3/dia2code/parse_diagram.c:321:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
            strncat(operation->key.implementation, attrlist->key.name, 76);
data/dia2code-0.8.3/dia2code/parse_diagram.c:322:13:  [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.
            strcat(operation->key.implementation, ";");
data/dia2code-0.8.3/dia2code/parse_diagram.c:328:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(operation->key.attr.type, attrlist->key.type, 79);
data/dia2code-0.8.3/dia2code/parse_diagram.c:493:34:  [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 (implementator != NULL && strlen(name) > 2) {
data/dia2code-0.8.3/dia2code/parse_diagram.c:592:17:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
                sscanf(objid, "%79s", tmplist->key->id);
data/dia2code-0.8.3/dia2code/parse_diagram.c:608:17:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
                sscanf(objid, "%79s", tmppcklist->key->id);
data/dia2code-0.8.3/dia2code/scan_tree.c:109:26:  [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 ( name != NULL && strlen(name) > 0 ) {
data/dia2code-0.8.3/dia2code/scan_tree.c:157:14:  [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(umla->key.type) > 0 ) {

ANALYSIS SUMMARY:

Hits = 256
Lines analyzed = 7356 in approximately 0.28 seconds (26612 lines/second)
Physical Source Lines of Code (SLOC) = 5645
Hits@level = [0] 457 [1]  99 [2] 106 [3]   3 [4]  48 [5]   0
Hits@level+ = [0+] 713 [1+] 256 [2+] 157 [3+]  51 [4+]  48 [5+]   0
Hits/KSLOC@level+ = [0+] 126.306 [1+] 45.3499 [2+] 27.8122 [3+] 9.03454 [4+] 8.5031 [5+]   0
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.