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/libftdi1-1.5/examples/async.c
Examining data/libftdi1-1.5/examples/baud_test.c
Examining data/libftdi1-1.5/examples/bitbang.c
Examining data/libftdi1-1.5/examples/bitbang2.c
Examining data/libftdi1-1.5/examples/bitbang_cbus.c
Examining data/libftdi1-1.5/examples/bitbang_ft2232.c
Examining data/libftdi1-1.5/examples/cmake_example/main.c
Examining data/libftdi1-1.5/examples/eeprom.c
Examining data/libftdi1-1.5/examples/find_all.c
Examining data/libftdi1-1.5/examples/find_all_pp.cpp
Examining data/libftdi1-1.5/examples/purge_test.c
Examining data/libftdi1-1.5/examples/serial_test.c
Examining data/libftdi1-1.5/examples/simple.c
Examining data/libftdi1-1.5/examples/stream_test.c
Examining data/libftdi1-1.5/ftdi_eeprom/main.c
Examining data/libftdi1-1.5/ftdipp/ftdi.cpp
Examining data/libftdi1-1.5/ftdipp/ftdi.hpp
Examining data/libftdi1-1.5/src/ftdi.c
Examining data/libftdi1-1.5/src/ftdi.h
Examining data/libftdi1-1.5/src/ftdi_i.h
Examining data/libftdi1-1.5/src/ftdi_stream.c
Examining data/libftdi1-1.5/test/basic.cpp
Examining data/libftdi1-1.5/test/baudrate.cpp

FINAL RESULTS:

data/libftdi1-1.5/src/ftdi.c:48:13:  [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(stderr, str);          \
data/libftdi1-1.5/src/ftdi.c:2623: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(eeprom->manufacturer, manufacturer);
data/libftdi1-1.5/src/ftdi.c:2633: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(eeprom->product, product);
data/libftdi1-1.5/src/ftdi.c:2653: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(eeprom->product, default_product);
data/libftdi1-1.5/src/ftdi.c:2663: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(eeprom->serial, serial);
data/libftdi1-1.5/src/ftdi.c:2749: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(eeprom->manufacturer, manufacturer);
data/libftdi1-1.5/src/ftdi.c:2758: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(eeprom->product, product);
data/libftdi1-1.5/src/ftdi.c:2768: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(eeprom->serial, serial);
data/libftdi1-1.5/examples/async.c:42:17:  [3] (buffer) getopt:
  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 ((i = getopt(argc, argv, "brw")) != -1)
data/libftdi1-1.5/examples/baud_test.c:70:17:  [3] (buffer) getopt:
  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 ((t = getopt (argc, argv, "b:d:p:m:c:")) != -1)
data/libftdi1-1.5/examples/bitbang2.c:52:17:  [3] (buffer) getopt:
  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 ((t = getopt (argc, argv, "d:")) != -1)
data/libftdi1-1.5/examples/eeprom.c:93:17:  [3] (buffer) getopt:
  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 ((i = getopt(argc, argv, "d::ev:p:l:P:S:w")) != -1)
data/libftdi1-1.5/examples/purge_test.c:140:17:  [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, "n:b:i:l:N:P", long_options, &option_index)) !=- 1)
data/libftdi1-1.5/examples/serial_test.c:40:17:  [3] (buffer) getopt:
  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 ((i = getopt(argc, argv, "i:v:p:b:w::")) != -1)
data/libftdi1-1.5/examples/stream_test.c:149:16:  [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, "P:n", long_options, &option_index)) !=- 1)
data/libftdi1-1.5/examples/baud_test.c:75:28:  [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).
                datasize = atoi (optarg);
data/libftdi1-1.5/examples/baud_test.c:95:24:  [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).
                baud = atoi (optarg);
data/libftdi1-1.5/examples/baud_test.c:101:31:  [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).
                txchunksize = atoi (optarg);
data/libftdi1-1.5/examples/bitbang.c:12: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 buf[1];
data/libftdi1-1.5/examples/bitbang2.c:57:25:  [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).
                delay = atoi (optarg);
data/libftdi1-1.5/examples/bitbang_cbus.c:41: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 buf[1];
data/libftdi1-1.5/examples/bitbang_cbus.c:43: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 input[10];
data/libftdi1-1.5/examples/bitbang_ft2232.c:19: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 buf[1];
data/libftdi1-1.5/examples/eeprom.c:19: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 buf[256];
data/libftdi1-1.5/examples/find_all.c:17: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 manufacturer[128], description[128];
data/libftdi1-1.5/examples/find_all_pp.cpp:58:16:  [2] (misc) open:
  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).
        if(it->open() == 0)
data/libftdi1-1.5/examples/purge_test.c:239:18:  [2] (misc) open:
  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).
        dev_fd = open(dev_string, O_NOCTTY | O_RDWR);
data/libftdi1-1.5/examples/serial_test.c:30: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 buf[1024];
data/libftdi1-1.5/examples/stream_test.c:210: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).
       if ((of = fopen(outfile,"w+")) == 0)
data/libftdi1-1.5/examples/stream_test.c:239:26:  [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).
       if ((outputFile = fopen(outfile,"r")) == 0)
data/libftdi1-1.5/examples/stream_test.c:260:8:  [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 buf0[1024];
data/libftdi1-1.5/examples/stream_test.c:261:8:  [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[1024];
data/libftdi1-1.5/examples/stream_test.c:262:8:  [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 bufr[1024];
data/libftdi1-1.5/ftdi_eeprom/main.c:365: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).
    if ((fp = fopen(cfg_filename, "r")) == NULL)
data/libftdi1-1.5/ftdi_eeprom/main.c:442:24:  [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 *fp = fopen (filename, "wb");
data/libftdi1-1.5/ftdi_eeprom/main.c:588:20:  [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 *fp = fopen(user_data_file, "rb");
data/libftdi1-1.5/ftdi_eeprom/main.c:637: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).
                FILE *fp = fopen(filename, "rb");
data/libftdi1-1.5/ftdi_eeprom/main.c:669:14:  [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(filename, "w");
data/libftdi1-1.5/ftdipp/ftdi.cpp:42:15:  [2] (misc) open:
  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).
            : open(false), ftdi(0), dev(0)
data/libftdi1-1.5/ftdipp/ftdi.cpp:49:13:  [2] (misc) open:
  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).
        if (open)
data/libftdi1-1.5/ftdipp/ftdi.cpp:55:10:  [2] (misc) open:
  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).
    bool open;
data/libftdi1-1.5/ftdipp/ftdi.cpp:80:15:  [2] (misc) open:
  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).
    return d->open;
data/libftdi1-1.5/ftdipp/ftdi.cpp:83:14:  [2] (misc) open:
  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).
int Context::open(int vendor, int product)
data/libftdi1-1.5/ftdipp/ftdi.cpp:94:14:  [2] (misc) open:
  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).
int Context::open(int vendor, int product, const std::string& description, const std::string& serial, unsigned int index)
data/libftdi1-1.5/ftdipp/ftdi.cpp:113:14:  [2] (misc) open:
  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).
int Context::open(const std::string& description)
data/libftdi1-1.5/ftdipp/ftdi.cpp:123:14:  [2] (misc) open:
  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).
int Context::open(struct libusb_device *dev)
data/libftdi1-1.5/ftdipp/ftdi.cpp:366: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 ivendor[512], idesc[512], iserial[512];
data/libftdi1-1.5/ftdipp/ftdi.hpp:82:9:  [2] (misc) open:
  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).
    int open(struct libusb_device *dev = 0);
data/libftdi1-1.5/ftdipp/ftdi.hpp:83:9:  [2] (misc) open:
  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).
    int open(int vendor, int product);
data/libftdi1-1.5/ftdipp/ftdi.hpp:84:9:  [2] (misc) open:
  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).
    int open(int vendor, int product, const std::string& description, const std::string& serial = std::string(), unsigned int index=0);
data/libftdi1-1.5/ftdipp/ftdi.hpp:85:9:  [2] (misc) open:
  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).
    int open(const std::string& description);
data/libftdi1-1.5/src/ftdi.c:769: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 string[256];
data/libftdi1-1.5/src/ftdi.c:1228:18:  [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 const char frac_code[8] = {0, 3, 2, 4, 1, 5, 6, 7};
data/libftdi1-1.5/src/ftdi.c:1229:18:  [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 const char am_adjust_up[8] = {0, 0, 0, 1, 0, 3, 2, 1};
data/libftdi1-1.5/src/ftdi.c:1230:18:  [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 const char am_adjust_dn[8] = {0, 0, 0, 1, 0, 1, 2, 3};
data/libftdi1-1.5/src/ftdi.c:1333:18:  [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 const char frac_code[8] = {0, 3, 2, 4, 1, 5, 6, 7};
data/libftdi1-1.5/src/ftdi.c:1650: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 (tc->buf + tc->offset, ftdi->readbuffer + ftdi->readbuffer_offset, actual_length);
data/libftdi1-1.5/src/ftdi.c:1670: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 (tc->buf + tc->offset, ftdi->readbuffer + ftdi->readbuffer_offset, part_size);
data/libftdi1-1.5/src/ftdi.c:1824: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 (buf, ftdi->readbuffer+ftdi->readbuffer_offset, size);
data/libftdi1-1.5/src/ftdi.c:1841: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 (buf, ftdi->readbuffer+ftdi->readbuffer_offset, ftdi->readbuffer_remaining);
data/libftdi1-1.5/src/ftdi.c:2024: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 (buf, ftdi->readbuffer+ftdi->readbuffer_offset, size);
data/libftdi1-1.5/src/ftdi.c:2037: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 (buf, ftdi->readbuffer+ftdi->readbuffer_offset, ftdi->readbuffer_remaining);
data/libftdi1-1.5/src/ftdi.c:2090: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 (buf+offset, ftdi->readbuffer+ftdi->readbuffer_offset, actual_length);
data/libftdi1-1.5/src/ftdi.c:2104: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 (buf+offset, ftdi->readbuffer+ftdi->readbuffer_offset, part_size);
data/libftdi1-1.5/src/ftdi.c:2349: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 usb_val[2];
data/libftdi1-1.5/src/ftdi.c:3464: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(output + eeprom->user_data_addr, eeprom->user_data, eeprom->user_data_size);
data/libftdi1-1.5/src/ftdi.c:4379: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(buf, ftdi->eeprom->buf, size);
data/libftdi1-1.5/src/ftdi.c:4402: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(ftdi->eeprom->buf, buf, size);
data/libftdi1-1.5/src/ftdi.c:4439: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 buf[2];
data/libftdi1-1.5/src/ftdi_i.h:139: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 buf[FTDI_MAX_EEPROM_SIZE];
data/libftdi1-1.5/examples/bitbang.c:35:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(3 * 1000000);
data/libftdi1-1.5/examples/bitbang.c:45:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(3 * 1000000);
data/libftdi1-1.5/examples/bitbang.c:55:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(3 * 1000000);
data/libftdi1-1.5/examples/bitbang.c:71:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(1 * 1000000);
data/libftdi1-1.5/examples/bitbang2.c:83:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(delay);
data/libftdi1-1.5/examples/bitbang_ft2232.c:70:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(1 * 1000000);
data/libftdi1-1.5/examples/bitbang_ft2232.c:77:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(1 * 1000000);
data/libftdi1-1.5/examples/bitbang_ft2232.c:84:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(1 * 1000000);
data/libftdi1-1.5/examples/bitbang_ft2232.c:91:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(1 * 1000000);
data/libftdi1-1.5/examples/purge_test.c:149:35:  [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 (optarg == NULL || strlen(optarg) != 1)
data/libftdi1-1.5/examples/purge_test.c:432:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(msg_xmit_time_us);
data/libftdi1-1.5/examples/purge_test.c:434:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(100000);
data/libftdi1-1.5/examples/purge_test.c:455:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(usec_delay);
data/libftdi1-1.5/examples/purge_test.c:478:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(usec_delay);
data/libftdi1-1.5/examples/purge_test.c:484:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(char_cnt_2_usec(4));
data/libftdi1-1.5/examples/purge_test.c:490:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            rc = read(dev_fd, retMsg, retMsgSize);
data/libftdi1-1.5/examples/purge_test.c:506:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(char_cnt_2_usec(10));
data/libftdi1-1.5/examples/purge_test.c:530: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).
    if (str == NULL || strlen(str) == 0)
data/libftdi1-1.5/examples/purge_test.c:607:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(sleep_interval);
data/libftdi1-1.5/examples/purge_test.c:612:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(char_cnt_2_usec(2));
data/libftdi1-1.5/examples/serial_test.c:162:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(1 * 1000000);
data/libftdi1-1.5/examples/stream_test.c:280:16:  [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.
           if( sscanf(pa,"%6u%94s%6u",&num_start, bufr,&num_end) !=3)
data/libftdi1-1.5/ftdi_eeprom/main.c:440: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 (filename != NULL && strlen(filename) > 0)
data/libftdi1-1.5/ftdi_eeprom/main.c:565: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 (user_data_file && strlen(user_data_file) > 0)
data/libftdi1-1.5/ftdi_eeprom/main.c:634:37:  [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 (filename != NULL && strlen(filename) > 0)
data/libftdi1-1.5/ftdi_eeprom/main.c:667: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 (filename != NULL && strlen(filename) > 0 && !cfg_getbool(cfg, "flash_raw"))
data/libftdi1-1.5/ftdipp/ftdi.cpp:244:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int Context::read(unsigned char *buf, int size)
data/libftdi1-1.5/ftdipp/ftdi.cpp:486:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int Eeprom::read(unsigned char *eeprom)
data/libftdi1-1.5/ftdipp/ftdi.hpp:103:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int read(unsigned char *buf, int size);
data/libftdi1-1.5/ftdipp/ftdi.hpp:163:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int read(unsigned char *eeprom);
data/libftdi1-1.5/src/ftdi.c:2621:47:  [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).
        eeprom->manufacturer = (char *)malloc(strlen(manufacturer)+1);
data/libftdi1-1.5/src/ftdi.c:2631:42:  [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).
        eeprom->product = (char *)malloc(strlen(product)+1);
data/libftdi1-1.5/src/ftdi.c:2651:42:  [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).
        eeprom->product = (char *)malloc(strlen(default_product) +1);
data/libftdi1-1.5/src/ftdi.c:2661: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).
        eeprom->serial = (char *)malloc(strlen(serial)+1);
data/libftdi1-1.5/src/ftdi.c:2747:47:  [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).
        eeprom->manufacturer = (char *)malloc(strlen(manufacturer)+1);
data/libftdi1-1.5/src/ftdi.c:2756:42:  [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).
        eeprom->product = (char *)malloc(strlen(product)+1);
data/libftdi1-1.5/src/ftdi.c:2765: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).
        eeprom->serial = (char *)malloc(strlen(serial)+1);
data/libftdi1-1.5/src/ftdi.c:2809:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(manufacturer, eeprom->manufacturer, mnf_len);
data/libftdi1-1.5/src/ftdi.c:2816:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(product, eeprom->product, prod_len);
data/libftdi1-1.5/src/ftdi.c:2823:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(serial, eeprom->serial, serial_len);
data/libftdi1-1.5/src/ftdi.c:2939: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).
        manufacturer_size = strlen(eeprom->manufacturer);
data/libftdi1-1.5/src/ftdi.c:2941: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).
        product_size = strlen(eeprom->product);
data/libftdi1-1.5/src/ftdi.c:2943: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).
        serial_size = strlen(eeprom->serial);

ANALYSIS SUMMARY:

Hits = 113
Lines analyzed = 10243 in approximately 0.40 seconds (25569 lines/second)
Physical Source Lines of Code (SLOC) = 7130
Hits@level = [0] 315 [1]  43 [2]  55 [3]   7 [4]   8 [5]   0
Hits@level+ = [0+] 428 [1+] 113 [2+]  70 [3+]  15 [4+]   8 [5+]   0
Hits/KSLOC@level+ = [0+] 60.0281 [1+] 15.8485 [2+] 9.81767 [3+] 2.10379 [4+] 1.12202 [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.