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/libu2f-host-1.1.10/tests/basic.c Examining data/libu2f-host-1.1.10/gl/string.in.h Examining data/libu2f-host-1.1.10/gl/sha256.h Examining data/libu2f-host-1.1.10/gl/stdint.in.h Examining data/libu2f-host-1.1.10/gl/check-version.c Examining data/libu2f-host-1.1.10/gl/stddef.in.h Examining data/libu2f-host-1.1.10/gl/sha256.c Examining data/libu2f-host-1.1.10/gl/sys_types.in.h Examining data/libu2f-host-1.1.10/gl/check-version.h Examining data/libu2f-host-1.1.10/gl/gl_openssl.h Examining data/libu2f-host-1.1.10/gl/strverscmp.c Examining data/libu2f-host-1.1.10/gl/stdalign.in.h Examining data/libu2f-host-1.1.10/build-aux/snippet/c++defs.h Examining data/libu2f-host-1.1.10/build-aux/snippet/arg-nonnull.h Examining data/libu2f-host-1.1.10/build-aux/snippet/warn-on-use.h Examining data/libu2f-host-1.1.10/u2f-host/register.c Examining data/libu2f-host-1.1.10/u2f-host/devs.c Examining data/libu2f-host-1.1.10/u2f-host/internal.h Examining data/libu2f-host-1.1.10/u2f-host/u2f-host-types.h Examining data/libu2f-host-1.1.10/u2f-host/cencode.c Examining data/libu2f-host-1.1.10/u2f-host/global.c Examining data/libu2f-host-1.1.10/u2f-host/cdecode.c Examining data/libu2f-host-1.1.10/u2f-host/u2f-host.h Examining data/libu2f-host-1.1.10/u2f-host/inc/u2f.h Examining data/libu2f-host-1.1.10/u2f-host/inc/u2f_hid.h Examining data/libu2f-host-1.1.10/u2f-host/b64/cencode.h Examining data/libu2f-host-1.1.10/u2f-host/b64/cdecode.h Examining data/libu2f-host-1.1.10/u2f-host/error.c Examining data/libu2f-host-1.1.10/u2f-host/authenticate.c Examining data/libu2f-host-1.1.10/u2f-host/version.c Examining data/libu2f-host-1.1.10/u2f-host/u2f-host-version.h Examining data/libu2f-host-1.1.10/u2f-host/u2fmisc.c Examining data/libu2f-host-1.1.10/src/u2f-host.c Examining data/libu2f-host-1.1.10/src/cmdline.h Examining data/libu2f-host-1.1.10/src/cmdline.c FINAL RESULTS: data/libu2f-host-1.1.10/src/cmdline.c:337:3: [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 (result, s); data/libu2f-host-1.1.10/u2f-host/authenticate.c:75:7: [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 (*response, reply); data/libu2f-host-1.1.10/u2f-host/devs.c:566:3: [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 (out, dev->device_string); data/libu2f-host-1.1.10/u2f-host/register.c:60:7: [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 (*response, reply); data/libu2f-host-1.1.10/u2f-host/u2fmisc.c:103:3: [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 (out, buf); data/libu2f-host-1.1.10/u2f-host/u2fmisc.c:422:3: [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 (p, urlb64); data/libu2f-host-1.1.10/src/cmdline.c:606:11: [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. c = getopt_long (argc, argv, "hVo:a:tdc:", long_options, &option_index); data/libu2f-host-1.1.10/gl/sha256.c:54:23: [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 unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; data/libu2f-host-1.1.10/gl/sha256.c:100:3: [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 (cp, &v, sizeof v); data/libu2f-host-1.1.10/gl/sha256.c:151:3: [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 (&((char *) ctx->buffer)[bytes], fillbuf, (size - 2) * 4 - bytes); data/libu2f-host-1.1.10/gl/sha256.c:361:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&((char *) ctx->buffer)[left_over], buffer, add); data/libu2f-host-1.1.10/gl/sha256.c:370:11: [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 (ctx->buffer, data/libu2f-host-1.1.10/gl/sha256.c:387:35: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. sha256_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx); data/libu2f-host-1.1.10/gl/sha256.c:405:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&((char *) ctx->buffer)[left_over], buffer, len); data/libu2f-host-1.1.10/gl/sha256.c:411:11: [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 (ctx->buffer, &ctx->buffer[16], left_over); data/libu2f-host-1.1.10/src/cmdline.c:305:13: [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 (filename, "w"); data/libu2f-host-1.1.10/src/u2f-host.c:34:3: [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 challenge[BUFSIZ]; data/libu2f-host-1.1.10/src/u2f-host.c:36:3: [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 response[2048] = {0}; data/libu2f-host-1.1.10/src/u2f-host.c:111: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. unsigned char out[2048]; data/libu2f-host-1.1.10/u2f-host/authenticate.c:32:3: [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 keyb64[256]; data/libu2f-host-1.1.10/u2f-host/authenticate.c:97:3: [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 b64enc[2048]; data/libu2f-host-1.1.10/u2f-host/authenticate.c:98:3: [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 bdstr[2048]; data/libu2f-host-1.1.10/u2f-host/authenticate.c:128: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. unsigned char data[CHALLBINLEN + HOSIZE + MAXKHLEN + 1]; data/libu2f-host-1.1.10/u2f-host/authenticate.c:129: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. unsigned char buf[MAXDATASIZE]; data/libu2f-host-1.1.10/u2f-host/authenticate.c:130:3: [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 bd[2048]; data/libu2f-host-1.1.10/u2f-host/authenticate.c:134:3: [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 chalb64[256]; data/libu2f-host-1.1.10/u2f-host/authenticate.c:136:3: [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 khb64[256]; data/libu2f-host-1.1.10/u2f-host/authenticate.c:177:13: [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 tmp_buf[MAXDATASIZE]; data/libu2f-host-1.1.10/u2f-host/authenticate.c:197:8: [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, tmp_buf, len); data/libu2f-host-1.1.10/u2f-host/authenticate.c:206:8: [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, tmp_buf, len); data/libu2f-host-1.1.10/u2f-host/devs.c:135: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). int handle = open (dev->path, O_RDWR); data/libu2f-host-1.1.10/u2f-host/devs.c:273: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 ((fd = open("/dev/urandom", O_RDONLY)) < 0) data/libu2f-host-1.1.10/u2f-host/devs.c:292: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. unsigned char resp[1024]; data/libu2f-host-1.1.10/u2f-host/devs.c:293: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. unsigned char nonce[8]; data/libu2f-host-1.1.10/u2f-host/devs.c:319:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((uint8_t*)&dev->cid, resp + offs, sizeof(dev->cid)); data/libu2f-host-1.1.10/u2f-host/devs.c:337: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. unsigned char data[1] = { 0 }; data/libu2f-host-1.1.10/u2f-host/devs.c:338: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. unsigned char resp[1024]; data/libu2f-host-1.1.10/u2f-host/register.c:81:3: [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 b64resp[2048]; data/libu2f-host-1.1.10/u2f-host/register.c:82:3: [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 bdstr[2048]; data/libu2f-host-1.1.10/u2f-host/register.c:112: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. unsigned char data[V2CHALLEN + HOSIZE]; data/libu2f-host-1.1.10/u2f-host/register.c:113: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. unsigned char buf[MAXDATASIZE]; data/libu2f-host-1.1.10/u2f-host/register.c:114:3: [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 bd[2048]; data/libu2f-host-1.1.10/u2f-host/register.c:118:3: [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 chalb64[256]; data/libu2f-host-1.1.10/u2f-host/u2fmisc.c:202:2: [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 (data, send + datasent, len); data/libu2f-host-1.1.10/u2f-host/u2fmisc.c:207: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. unsigned char data[sizeof (U2FHID_FRAME) + 1]; data/libu2f-host-1.1.10/u2f-host/u2fmisc.c:211:2: [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 (data + 1, &frame, sizeof (U2FHID_FRAME)); data/libu2f-host-1.1.10/u2f-host/u2fmisc.c:230: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 data[HID_RPT_SIZE]; data/libu2f-host-1.1.10/u2f-host/u2fmisc.c:272:2: [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 (&frame, data, HID_RPT_SIZE); data/libu2f-host-1.1.10/u2f-host/u2fmisc.c:285: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 (recv, frame.init.data, sizeof (frame.init.data)); data/libu2f-host-1.1.10/u2f-host/u2fmisc.c:321:2: [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 (&frame, data, HID_RPT_SIZE); data/libu2f-host-1.1.10/u2f-host/u2fmisc.c:332:2: [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 (recv + recvddata, frame.cont.data, sizeof (frame.cont.data)); data/libu2f-host-1.1.10/u2f-host/u2fmisc.c:344: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. unsigned char data[2048] = { 0 }; data/libu2f-host-1.1.10/u2f-host/u2fmisc.c:354:3: [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 (data + RESPHEAD_SIZE, d, dlen); data/libu2f-host-1.1.10/gl/string.in.h:378:11: [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. # undef strncat data/libu2f-host-1.1.10/gl/string.in.h:379:12: [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. # define strncat rpl_strncat data/libu2f-host-1.1.10/gl/string.in.h:381:19: [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. _GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n) data/libu2f-host-1.1.10/gl/string.in.h:383:19: [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. _GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n)); data/libu2f-host-1.1.10/gl/string.in.h:385:19: [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. _GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n)); data/libu2f-host-1.1.10/gl/string.in.h:387:19: [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. _GL_CXXALIASWARN (strncat); data/libu2f-host-1.1.10/gl/string.in.h:389:9: [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. # undef strncat data/libu2f-host-1.1.10/gl/string.in.h:391:18: [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. _GL_WARN_ON_USE (strncat, "strncat is unportable - " data/libu2f-host-1.1.10/src/cmdline.c:116: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). (strlen (CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME data/libu2f-host-1.1.10/src/cmdline.c:119:7: [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 (gengetopt_args_info_versiontext) > 0) data/libu2f-host-1.1.10/src/cmdline.c:128:7: [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 (gengetopt_args_info_purpose) > 0) data/libu2f-host-1.1.10/src/cmdline.c:131:7: [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 (gengetopt_args_info_usage) > 0) data/libu2f-host-1.1.10/src/cmdline.c:136:7: [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 (gengetopt_args_info_description) > 0) data/libu2f-host-1.1.10/src/cmdline.c:224: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). for (i = 0, len = strlen (val); values[i]; ++i) data/libu2f-host-1.1.10/src/cmdline.c:230:8: [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 (values[i]) == len) data/libu2f-host-1.1.10/src/cmdline.c:334: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). result = (char *) malloc (strlen (s) + 1); data/libu2f-host-1.1.10/src/u2f-host.c:135:7: [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 (response)) data/libu2f-host-1.1.10/u2f-host/authenticate.c:69:11: [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 (reply) >= *response_len) data/libu2f-host-1.1.10/u2f-host/authenticate.c:72: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). *response_len = strlen (reply) + 1; data/libu2f-host-1.1.10/u2f-host/authenticate.c:77: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). *response_len = strlen (reply); data/libu2f-host-1.1.10/u2f-host/authenticate.c:103:7: [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 (bd) > 2048) data/libu2f-host-1.1.10/u2f-host/authenticate.c:111: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). cnt = base64_encode_block (bd, strlen (bd), bdstr, &b64ctx); data/libu2f-host-1.1.10/u2f-host/devs.c:275:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((r = read(fd, nonce, 8)) < 0 || r != 8) data/libu2f-host-1.1.10/u2f-host/devs.c:557:7: [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). i = strlen (dev->device_string); data/libu2f-host-1.1.10/u2f-host/internal.h:32:19: [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. #define Sleep(x) (usleep((x) * 1000)) data/libu2f-host-1.1.10/u2f-host/register.c:54:11: [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 (reply) >= *response_len) data/libu2f-host-1.1.10/u2f-host/register.c:57: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). *response_len = strlen (reply) + 1; data/libu2f-host-1.1.10/u2f-host/register.c:62: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). *response_len = strlen (reply); data/libu2f-host-1.1.10/u2f-host/register.c:87:7: [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 (bd) > 2048) data/libu2f-host-1.1.10/u2f-host/register.c:95: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). cnt = base64_encode_block (bd, strlen (bd), bdstr, &b64ctx); data/libu2f-host-1.1.10/u2f-host/u2fmisc.c:96:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (buf); data/libu2f-host-1.1.10/u2f-host/u2fmisc.c:140:49: [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). sha256_buffer (app_id ? app_id : "", app_id ? strlen (app_id) : 0, p); data/libu2f-host-1.1.10/u2f-host/u2fmisc.c:416:7: [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 (urlb64) >= *len) data/libu2f-host-1.1.10/u2f-host/u2fmisc.c:420:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *len = strlen (urlb64); ANALYSIS SUMMARY: Hits = 87 Lines analyzed = 7173 in approximately 0.24 seconds (30519 lines/second) Physical Source Lines of Code (SLOC) = 4616 Hits@level = [0] 69 [1] 34 [2] 46 [3] 1 [4] 6 [5] 0 Hits@level+ = [0+] 156 [1+] 87 [2+] 53 [3+] 7 [4+] 6 [5+] 0 Hits/KSLOC@level+ = [0+] 33.7955 [1+] 18.8475 [2+] 11.4818 [3+] 1.51646 [4+] 1.29983 [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.