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/dxflib-3.17.0/src/dl_dxf.cpp
Examining data/dxflib-3.17.0/src/dl_attributes.h
Examining data/dxflib-3.17.0/src/dl_global.h
Examining data/dxflib-3.17.0/src/dl_entities.h
Examining data/dxflib-3.17.0/src/dl_exception.h
Examining data/dxflib-3.17.0/src/dl_extrusion.h
Examining data/dxflib-3.17.0/src/dl_dxf.h
Examining data/dxflib-3.17.0/src/dl_writer_ascii.cpp
Examining data/dxflib-3.17.0/src/dl_creationadapter.h
Examining data/dxflib-3.17.0/src/dl_creationinterface.h
Examining data/dxflib-3.17.0/src/dl_codes.h
Examining data/dxflib-3.17.0/src/dl_writer_ascii.h
Examining data/dxflib-3.17.0/src/dl_writer.h
Examining data/dxflib-3.17.0/examples/readwrite/test_creationclass.cpp
Examining data/dxflib-3.17.0/examples/readwrite/main.cpp
Examining data/dxflib-3.17.0/examples/readwrite/test_creationclass.h
Examining data/dxflib-3.17.0/examples/writehatch/main.cpp
Examining data/dxflib-3.17.0/examples/writedimension/main.cpp

FINAL RESULTS:

data/dxflib-3.17.0/src/dl_dxf.cpp:2313: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(f, file);
data/dxflib-3.17.0/src/dl_dxf.cpp:115:10:  [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).
    fp = fopen(file.c_str(), "rt");
data/dxflib-3.17.0/src/dl_dxf.cpp:2859: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 chunk[251];
data/dxflib-3.17.0/src/dl_dxf.cpp:5239:16:  [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).
        ret = (atoi(v[0].c_str())<<(3*8)) +
data/dxflib-3.17.0/src/dl_dxf.cpp:5240:16:  [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).
              (atoi(v[1].c_str())<<(2*8)) +
data/dxflib-3.17.0/src/dl_dxf.cpp:5241:16:  [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).
              (atoi(v[2].c_str())<<(1*8)) +
data/dxflib-3.17.0/src/dl_dxf.cpp:5242:16:  [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).
              (atoi(v[3].c_str())<<(0*8));
data/dxflib-3.17.0/src/dl_dxf.cpp:5298: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(buf1, "  10\n");
data/dxflib-3.17.0/src/dl_dxf.cpp:5299: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(buf2, "10");
data/dxflib-3.17.0/src/dl_dxf.cpp:5300: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(buf3, "10\n");
data/dxflib-3.17.0/src/dl_dxf.cpp:5301: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(buf4, "  10 \n");
data/dxflib-3.17.0/src/dl_dxf.cpp:5302: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(buf5, "  10 \r");
data/dxflib-3.17.0/src/dl_dxf.cpp:5303: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(buf6, "\t10 \n");
data/dxflib-3.17.0/src/dl_dxf.h:509: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 settingValue[DL_DXF_MAXLINE+1];
data/dxflib-3.17.0/src/dl_writer_ascii.cpp:62: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[256];
data/dxflib-3.17.0/src/dl_writer_ascii.cpp:64: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(str, "%.6lf", value);
data/dxflib-3.17.0/src/dl_writer_ascii.cpp:67: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(str, "%.16lf", value);
data/dxflib-3.17.0/src/dl_writer_ascii.cpp:114: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[12];
data/dxflib-3.17.0/src/dl_writer_ascii.cpp:115: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(str, "%0X", value);
data/dxflib-3.17.0/src/dl_dxf.cpp:301: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).
    int lastChar = strlen(*s) - 1;
data/dxflib-3.17.0/src/dl_dxf.cpp:2312: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).
    char* f = new char[strlen(file)+1];
data/dxflib-3.17.0/src/dl_dxf.cpp:2862:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(chunk, &data.text.c_str()[i-250], 250);
data/dxflib-3.17.0/src/dl_dxf.cpp:2866:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(chunk, &data.text.c_str()[i-250], 250);
data/dxflib-3.17.0/src/dl_writer_ascii.cpp:76: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).
    for (unsigned int i=0; i<strlen(str); ++i) {
data/dxflib-3.17.0/src/dl_writer_ascii.cpp:85: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).
    if (end>0 && end<(int)strlen(str)) {
data/dxflib-3.17.0/src/dl_writer_ascii.cpp:150: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).
    for (i=0; i<strlen(str); i++) {

ANALYSIS SUMMARY:

Hits = 26
Lines analyzed = 10709 in approximately 0.29 seconds (37332 lines/second)
Physical Source Lines of Code (SLOC) = 6375
Hits@level = [0]  23 [1]   7 [2]  18 [3]   0 [4]   1 [5]   0
Hits@level+ = [0+]  49 [1+]  26 [2+]  19 [3+]   1 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 7.68627 [1+] 4.07843 [2+] 2.98039 [3+] 0.156863 [4+] 0.156863 [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.