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/harfbuzz-2.6.7/test/fuzzing/hb-set-fuzzer.cc Examining data/harfbuzz-2.6.7/test/fuzzing/hb-draw-fuzzer.cc Examining data/harfbuzz-2.6.7/test/fuzzing/hb-shape-fuzzer.cc Examining data/harfbuzz-2.6.7/test/fuzzing/hb-subset-fuzzer.cc Examining data/harfbuzz-2.6.7/test/fuzzing/main.cc Examining data/harfbuzz-2.6.7/test/api/test-c.c Examining data/harfbuzz-2.6.7/test/api/test-subset-sbix.c Examining data/harfbuzz-2.6.7/test/api/test-version.c Examining data/harfbuzz-2.6.7/test/api/test-ot-tag.c Examining data/harfbuzz-2.6.7/test/api/test-map.c Examining data/harfbuzz-2.6.7/test/api/test-baseline.c Examining data/harfbuzz-2.6.7/test/api/test-ot-color.c Examining data/harfbuzz-2.6.7/test/api/test-ot-face.c Examining data/harfbuzz-2.6.7/test/api/test-object.c Examining data/harfbuzz-2.6.7/test/api/test-cplusplus.cc Examining data/harfbuzz-2.6.7/test/api/test-subset.c Examining data/harfbuzz-2.6.7/test/api/test-ot-metrics.c Examining data/harfbuzz-2.6.7/test/api/test-subset-post.c Examining data/harfbuzz-2.6.7/test/api/test-font.c Examining data/harfbuzz-2.6.7/test/api/test-ot-math.c Examining data/harfbuzz-2.6.7/test/api/hb-test.h Examining data/harfbuzz-2.6.7/test/api/test-subset-hmtx.c Examining data/harfbuzz-2.6.7/test/api/test-buffer.c Examining data/harfbuzz-2.6.7/test/api/test-subset-hvar.c Examining data/harfbuzz-2.6.7/test/api/test-subset-gvar.c Examining data/harfbuzz-2.6.7/test/api/test-subset-hdmx.c Examining data/harfbuzz-2.6.7/test/api/test-ot-name.c Examining data/harfbuzz-2.6.7/test/api/test-aat-layout.c Examining data/harfbuzz-2.6.7/test/api/test-var-coords.c Examining data/harfbuzz-2.6.7/test/api/test-subset-vvar.c Examining data/harfbuzz-2.6.7/test/api/test-ot-extents-cff.c Examining data/harfbuzz-2.6.7/test/api/test-blob.c Examining data/harfbuzz-2.6.7/test/api/test-subset-cff2.c Examining data/harfbuzz-2.6.7/test/api/test-subset-cbdt.c Examining data/harfbuzz-2.6.7/test/api/test-ot-ligature-carets.c Examining data/harfbuzz-2.6.7/test/api/test-subset-nameids.c Examining data/harfbuzz-2.6.7/test/api/test-subset-drop-tables.c Examining data/harfbuzz-2.6.7/test/api/test-subset-gpos.c Examining data/harfbuzz-2.6.7/test/api/test-subset-vmtx.c Examining data/harfbuzz-2.6.7/test/api/test-subset-os2.c Examining data/harfbuzz-2.6.7/test/api/hb-subset-test.h Examining data/harfbuzz-2.6.7/test/api/test-unicode.c Examining data/harfbuzz-2.6.7/test/api/test-subset-cmap.c Examining data/harfbuzz-2.6.7/test/api/test-ot-metrics-tt-var.c Examining data/harfbuzz-2.6.7/test/api/test-ot-glyphname.c Examining data/harfbuzz-2.6.7/test/api/test-collect-unicodes.c Examining data/harfbuzz-2.6.7/test/api/test-ot-meta.c Examining data/harfbuzz-2.6.7/test/api/test-common.c Examining data/harfbuzz-2.6.7/test/api/test-draw.c Examining data/harfbuzz-2.6.7/test/api/test-subset-glyf.c Examining data/harfbuzz-2.6.7/test/api/test-subset-colr.c Examining data/harfbuzz-2.6.7/test/api/test-multithread.c Examining data/harfbuzz-2.6.7/test/api/test-subset-cff1.c Examining data/harfbuzz-2.6.7/test/api/test-set.c Examining data/harfbuzz-2.6.7/test/api/test-shape.c Examining data/harfbuzz-2.6.7/util/hb-subset.cc Examining data/harfbuzz-2.6.7/util/hb-view.cc Examining data/harfbuzz-2.6.7/util/options-subset.cc Examining data/harfbuzz-2.6.7/util/helper-cairo.cc Examining data/harfbuzz-2.6.7/util/options.cc Examining data/harfbuzz-2.6.7/util/view-cairo.cc Examining data/harfbuzz-2.6.7/util/helper-cairo-ansi.cc Examining data/harfbuzz-2.6.7/util/ansi-print.cc Examining data/harfbuzz-2.6.7/util/hb-shape.cc Examining data/harfbuzz-2.6.7/util/hb-ot-shape-closure.cc Examining data/harfbuzz-2.6.7/src/hb-ot-shape-complex-vowel-constraints.cc Examining data/harfbuzz-2.6.7/src/hb-ot-shape.cc Examining data/harfbuzz-2.6.7/src/hb-ot.h Examining data/harfbuzz-2.6.7/src/hb.h Examining data/harfbuzz-2.6.7/src/test-meta.cc Examining data/harfbuzz-2.6.7/src/hb-subset-cff2.cc Examining data/harfbuzz-2.6.7/src/hb-ot-tag.cc Examining data/harfbuzz-2.6.7/src/test-buffer-serialize.cc Examining data/harfbuzz-2.6.7/src/hb-directwrite.cc Examining data/harfbuzz-2.6.7/src/hb-ot-layout.h Examining data/harfbuzz-2.6.7/src/hb-subset.cc Examining data/harfbuzz-2.6.7/src/hb-fallback-shape.cc Examining data/harfbuzz-2.6.7/src/hb-subset-input.cc Examining data/harfbuzz-2.6.7/src/hb-ot-cff2-table.cc Examining data/harfbuzz-2.6.7/src/hb-shape.h Examining data/harfbuzz-2.6.7/src/hb-subset.h Examining data/harfbuzz-2.6.7/src/test-array.cc Examining data/harfbuzz-2.6.7/src/hb-ot-shape-complex-indic-table.cc Examining data/harfbuzz-2.6.7/src/hb-gdi.cc Examining data/harfbuzz-2.6.7/src/hb-uniscribe.cc Examining data/harfbuzz-2.6.7/src/hb-blob.cc Examining data/harfbuzz-2.6.7/src/hb-aat-layout.h Examining data/harfbuzz-2.6.7/src/hb-face.h Examining data/harfbuzz-2.6.7/src/hb-deprecated.h Examining data/harfbuzz-2.6.7/src/hb-ot-shape-complex-thai.cc Examining data/harfbuzz-2.6.7/src/hb-gdi.h Examining data/harfbuzz-2.6.7/src/hb-icu.cc Examining data/harfbuzz-2.6.7/src/hb-ot-map.cc Examining data/harfbuzz-2.6.7/src/test-gpos-size-params.cc Examining data/harfbuzz-2.6.7/src/hb-ucd.cc Examining data/harfbuzz-2.6.7/src/dump-myanmar-data.cc Examining data/harfbuzz-2.6.7/src/hb-ot-shape-complex-use.cc Examining data/harfbuzz-2.6.7/src/test-bimap.cc Examining data/harfbuzz-2.6.7/src/hb-ot-shape-fallback.cc Examining data/harfbuzz-2.6.7/src/hb-graphite2.h Examining data/harfbuzz-2.6.7/src/hb-directwrite.h Examining data/harfbuzz-2.6.7/src/hb-common.h Examining data/harfbuzz-2.6.7/src/hb-subset-cff1.cc Examining data/harfbuzz-2.6.7/src/hb-unicode.h Examining data/harfbuzz-2.6.7/src/hb-ot-shape-normalize.cc Examining data/harfbuzz-2.6.7/src/hb-ot-shape-complex-hebrew.cc Examining data/harfbuzz-2.6.7/src/test-ot-meta.cc Examining data/harfbuzz-2.6.7/src/hb-version.h Examining data/harfbuzz-2.6.7/src/hb-aat-map.cc Examining data/harfbuzz-2.6.7/src/hb-ot-shape-complex-arabic.cc Examining data/harfbuzz-2.6.7/src/hb-font.cc Examining data/harfbuzz-2.6.7/src/hb-ot-math.h Examining data/harfbuzz-2.6.7/src/hb-draw.h Examining data/harfbuzz-2.6.7/src/hb-subset-plan.cc Examining data/harfbuzz-2.6.7/src/hb-static.cc Examining data/harfbuzz-2.6.7/src/hb-ot-shape-complex-use-table.cc Examining data/harfbuzz-2.6.7/src/test-unicode-ranges.cc Examining data/harfbuzz-2.6.7/src/hb-ot-color.h Examining data/harfbuzz-2.6.7/src/hb-ot-meta.h Examining data/harfbuzz-2.6.7/src/hb-icu.h Examining data/harfbuzz-2.6.7/src/hb-gobject.h Examining data/harfbuzz-2.6.7/src/hb-ot-name.cc Examining data/harfbuzz-2.6.7/src/hb-shaper.cc Examining data/harfbuzz-2.6.7/src/hb-graphite2.cc Examining data/harfbuzz-2.6.7/src/hb-ot-meta.cc Examining data/harfbuzz-2.6.7/src/dump-use-data.cc Examining data/harfbuzz-2.6.7/src/hb-buffer.h Examining data/harfbuzz-2.6.7/src/test.cc Examining data/harfbuzz-2.6.7/src/hb-face.cc Examining data/harfbuzz-2.6.7/src/test-algs.cc Examining data/harfbuzz-2.6.7/src/hb-ot-shape-complex-indic.cc Examining data/harfbuzz-2.6.7/src/hb-ot-layout.cc Examining data/harfbuzz-2.6.7/src/hb-aat-layout.cc Examining data/harfbuzz-2.6.7/src/hb-ot-math.cc Examining data/harfbuzz-2.6.7/src/hb-draw.cc Examining data/harfbuzz-2.6.7/src/hb-common.cc Examining data/harfbuzz-2.6.7/src/hb-aat.h Examining data/harfbuzz-2.6.7/src/hb-ot-color.cc Examining data/harfbuzz-2.6.7/src/hb-set.cc Examining data/harfbuzz-2.6.7/src/hb-unicode.cc Examining data/harfbuzz-2.6.7/src/hb-number.cc Examining data/harfbuzz-2.6.7/src/hb-map.h Examining data/harfbuzz-2.6.7/src/hb-blob.h Examining data/harfbuzz-2.6.7/src/hb-shape-plan.cc Examining data/harfbuzz-2.6.7/src/dump-khmer-data.cc Examining data/harfbuzz-2.6.7/src/test-iter.cc Examining data/harfbuzz-2.6.7/src/hb-map.cc Examining data/harfbuzz-2.6.7/src/hb-ot-var.cc Examining data/harfbuzz-2.6.7/src/hb-ot-font.h Examining data/harfbuzz-2.6.7/src/hb-buffer.cc Examining data/harfbuzz-2.6.7/src/hb-coretext.cc Examining data/harfbuzz-2.6.7/src/hb-ot-shape-complex-khmer.cc Examining data/harfbuzz-2.6.7/src/hb-glib.h Examining data/harfbuzz-2.6.7/src/hb-ft.h Examining data/harfbuzz-2.6.7/src/test-gsub-would-substitute.cc Examining data/harfbuzz-2.6.7/src/hb-uniscribe.h Examining data/harfbuzz-2.6.7/src/hb-buffer-serialize.cc Examining data/harfbuzz-2.6.7/src/hb-ot-shape-complex-hangul.cc Examining data/harfbuzz-2.6.7/src/hb-ot-cff1-table.cc Examining data/harfbuzz-2.6.7/src/hb-ot-face.cc Examining data/harfbuzz-2.6.7/src/test-number.cc Examining data/harfbuzz-2.6.7/src/hb-font.h Examining data/harfbuzz-2.6.7/src/hb-ot-shape-complex-default.cc Examining data/harfbuzz-2.6.7/src/hb-ot-var.h Examining data/harfbuzz-2.6.7/src/test-ot-glyphname.cc Examining data/harfbuzz-2.6.7/src/hb-ot-name.h Examining data/harfbuzz-2.6.7/src/hb-gobject-structs.h Examining data/harfbuzz-2.6.7/src/dump-indic-data.cc Examining data/harfbuzz-2.6.7/src/hb-ot-font.cc Examining data/harfbuzz-2.6.7/src/hb-glib.cc Examining data/harfbuzz-2.6.7/src/harfbuzz.cc Examining data/harfbuzz-2.6.7/src/hb-ot-shape.h Examining data/harfbuzz-2.6.7/src/hb-ft.cc Examining data/harfbuzz-2.6.7/src/main.cc Examining data/harfbuzz-2.6.7/src/hb-shape-plan.h Examining data/harfbuzz-2.6.7/src/hb-set.h Examining data/harfbuzz-2.6.7/src/hb-ot-metrics.cc Examining data/harfbuzz-2.6.7/src/hb-coretext.h Examining data/harfbuzz-2.6.7/src/hb-subset-cff-common.cc Examining data/harfbuzz-2.6.7/src/hb-shape.cc Examining data/harfbuzz-2.6.7/src/hb-ot-deprecated.h Examining data/harfbuzz-2.6.7/src/hb-ot-shape-complex-myanmar.cc Examining data/harfbuzz-2.6.7/src/hb-gobject-structs.cc Examining data/harfbuzz-2.6.7/src/hb-ot-metrics.h Examining data/harfbuzz-2.6.7/src/test-ot-name.cc Examining data/harfbuzz-2.6.7/meson-cc-tests/intel-atomic-primitives-test.c Examining data/harfbuzz-2.6.7/meson-cc-tests/solaris-atomic-operations.c FINAL RESULTS: data/harfbuzz-2.6.7/src/hb-buffer-serialize.cc:124:35: [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). #define APPEND(s) HB_STMT_START { strcpy (p, s); p += strlen (s); } HB_STMT_END data/harfbuzz-2.6.7/src/hb-buffer.cc:2001:3: [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 (buf, sizeof (buf), fmt, ap); data/harfbuzz-2.6.7/src/main.cc:60:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (output_path, "out/svg-%u-%u.svg%s", data/harfbuzz-2.6.7/src/hb-common.cc:59:19: [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. const char *c = getenv ("HB_OPTIONS"); data/harfbuzz-2.6.7/src/hb-directwrite.cc:170:22: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. data->dwrite_dll = LoadLibrary (TEXT ("DWRITE")); data/harfbuzz-2.6.7/src/hb-ot-layout.cc:1963:35: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. if (lookups[table_index][i].random) data/harfbuzz-2.6.7/src/hb-ot-map.cc:105:21: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. bool random) data/harfbuzz-2.6.7/src/hb-ot-map.cc:132:24: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. lookup->random = random; data/harfbuzz-2.6.7/src/hb-ot-map.cc:308:24: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. m.features[i].random); data/harfbuzz-2.6.7/src/hb-shaper.cc:50: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. char *env = getenv ("HB_SHAPER_LIST"); data/harfbuzz-2.6.7/test/api/hb-test.h:62:9: [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. s = getenv ("srcdir"); data/harfbuzz-2.6.7/src/hb-blob.cc:463: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 (new_data, this->data, this->length); data/harfbuzz-2.6.7/src/hb-blob.cc:540:12: [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 fd = open (rsrc_name, O_RDONLY | O_BINARY, 0); data/harfbuzz-2.6.7/src/hb-blob.cc:576:12: [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 fd = open (file_name, O_RDONLY | O_BINARY, 0); data/harfbuzz-2.6.7/src/hb-blob.cc:680: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). FILE *fp = fopen (file_name, "rb"); data/harfbuzz-2.6.7/src/hb-buffer-serialize.cc: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 b[1024]; data/harfbuzz-2.6.7/src/hb-buffer-serialize.cc:134:7: [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 g[128]; data/harfbuzz-2.6.7/src/hb-buffer-serialize.cc:181: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 (buf, b, l); data/harfbuzz-2.6.7/src/hb-buffer-serialize.cc:217: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 b[1024]; data/harfbuzz-2.6.7/src/hb-buffer-serialize.cc:267: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 (buf, b, l); data/harfbuzz-2.6.7/src/hb-buffer.cc:170: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 (out_info, info, out_len * sizeof (out_info[0])); data/harfbuzz-2.6.7/src/hb-buffer.cc:1761: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 (buffer->info + orig_len, source->info + start, (end - start) * sizeof (buffer->info[0])); data/harfbuzz-2.6.7/src/hb-buffer.cc:1763: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 (buffer->pos + orig_len, source->pos + start, (end - start) * sizeof (buffer->pos[0])); data/harfbuzz-2.6.7/src/hb-buffer.cc:2000: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 buf[100]; data/harfbuzz-2.6.7/src/hb-common.cc:101: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 tag[4]; data/harfbuzz-2.6.7/src/hb-common.cc:197:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char s[1]; data/harfbuzz-2.6.7/src/hb-common.cc:200: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. static const char canon_map[256] = { data/harfbuzz-2.6.7/src/hb-common.cc:260: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((unsigned char *) lang, s, len); data/harfbuzz-2.6.7/src/hb-common.cc:356: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 strbuf[64]; data/harfbuzz-2.6.7/src/hb-common.cc:358: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 (strbuf, str, len); data/harfbuzz-2.6.7/src/hb-common.cc:929: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 s[128]; data/harfbuzz-2.6.7/src/hb-common.cc:956: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 (buf, s, len); data/harfbuzz-2.6.7/src/hb-common.cc:1019: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 s[128]; data/harfbuzz-2.6.7/src/hb-common.cc:1030: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 (buf, s, len); data/harfbuzz-2.6.7/src/hb-coretext.cc:586:6: [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 tag[5] = {HB_UNTAG (active_features[j].rec.feature)}; data/harfbuzz-2.6.7/src/hb-directwrite.cc:637:9: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const wchar_t localeName[20] = {0}; data/harfbuzz-2.6.7/src/hb-font.cc:1442: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 (coords, parent->coords, num_coords * sizeof (parent->coords[0])); data/harfbuzz-2.6.7/src/hb-font.cc:1443: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 (design_coords, parent->design_coords, num_coords * sizeof (parent->design_coords[0])); data/harfbuzz-2.6.7/src/hb-font.cc:1944: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 (design_coords, coords, coords_length * sizeof (font->design_coords[0])); data/harfbuzz-2.6.7/src/hb-font.cc:2004: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 (copy, coords, coords_length * sizeof (coords[0])); data/harfbuzz-2.6.7/src/hb-font.cc:2005: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 (unmapped, coords, coords_length * sizeof (coords[0])); data/harfbuzz-2.6.7/src/hb-ft.cc:526: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 buf[128]; data/harfbuzz-2.6.7/src/hb-ft.cc:536: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 buf[128]; data/harfbuzz-2.6.7/src/hb-number.cc: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 buf[32]; data/harfbuzz-2.6.7/src/hb-ot-tag.cc:206: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 language[4]; data/harfbuzz-2.6.7/src/hb-ot-tag.cc:319: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 tag[4]; data/harfbuzz-2.6.7/src/hb-ot-tag.cc:458: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 buf[20]; data/harfbuzz-2.6.7/src/hb-ot-tag.cc:521: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 (buf, lang_str, len); data/harfbuzz-2.6.7/src/hb-shape-plan.cc:70: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 (features, user_features, num_user_features * sizeof (hb_feature_t)); data/harfbuzz-2.6.7/src/hb-shaper.cc:58: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 (shapers, all_shapers, sizeof (all_shapers)); data/harfbuzz-2.6.7/src/hb-static.cc:51:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const unsigned char _hb_Null_AAT_Lookup[2] = {0xFF, 0xFF}; data/harfbuzz-2.6.7/src/hb-uniscribe.cc:332:3: [2] (buffer) wchar_t: 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. wchar_t face_name[LF_FACESIZE]; data/harfbuzz-2.6.7/src/hb-uniscribe.cc:401: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(new_sfnt_data, orig_sfnt_data, length); data/harfbuzz-2.6.7/src/main.cc:59: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 output_path[255]; data/harfbuzz-2.6.7/src/main.cc:66: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 (output_path, "wb"); data/harfbuzz-2.6.7/src/main.cc:113: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 output_path[255]; data/harfbuzz-2.6.7/src/main.cc:114:2: [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 (output_path, "out/png-%u-%u-%u.png", glyph_id, strike, face_index); data/harfbuzz-2.6.7/src/main.cc:116:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen (output_path, "wb"); data/harfbuzz-2.6.7/src/main.cc:213: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 output_path[255]; data/harfbuzz-2.6.7/src/main.cc:214:2: [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 (output_path, "out/colr-%u-%u-%u.svg", gid, palette, face_index); data/harfbuzz-2.6.7/src/main.cc:215:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen (output_path, "wb"); data/harfbuzz-2.6.7/src/main.cc:264: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 output_path[255]; data/harfbuzz-2.6.7/src/main.cc:265: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 (output_path, "out/%u-%u.svg", face_index, gid); data/harfbuzz-2.6.7/src/main.cc:266: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 (output_path, "wb"); data/harfbuzz-2.6.7/src/main.cc:284: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). FILE *font_name_file = fopen ("out/.dumped_font_name", "r"); data/harfbuzz-2.6.7/src/main.cc:292: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). font_name_file = fopen ("out/.dumped_font_name", "w"); data/harfbuzz-2.6.7/src/test-buffer-serialize.cc:70: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 line[BUFSIZ], out[BUFSIZ]; data/harfbuzz-2.6.7/src/test-ot-glyphname.cc:57: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 buf[64]; data/harfbuzz-2.6.7/src/test-ot-name.cc:61: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 buf[64]; data/harfbuzz-2.6.7/test/api/hb-test.h:50:43: [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. #define HB_TAG_CHAR4(s) (HB_TAG(((const char *) s)[0], \ data/harfbuzz-2.6.7/test/api/hb-test.h:51:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ((const char *) s)[1], \ data/harfbuzz-2.6.7/test/api/hb-test.h:52:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ((const char *) s)[2], \ data/harfbuzz-2.6.7/test/api/hb-test.h:53:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ((const char *) s)[3])) data/harfbuzz-2.6.7/test/api/test-blob.c:167: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 *) data, test_data, sizeof (test_data)); data/harfbuzz-2.6.7/test/api/test-blob.c:179: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 *) data, test_data, sizeof (test_data)); data/harfbuzz-2.6.7/test/api/test-buffer.c:32: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. static const char utf8[10] = "ab\360\240\200\200defg"; data/harfbuzz-2.6.7/test/api/test-buffer.c:366:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char utf8[8]; data/harfbuzz-2.6.7/test/api/test-draw.c:77: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 buf[ITOA_BUF_SIZE]; data/harfbuzz-2.6.7/test/api/test-draw.c:84: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 buf[ITOA_BUF_SIZE]; data/harfbuzz-2.6.7/test/api/test-draw.c:91: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 buf[ITOA_BUF_SIZE]; data/harfbuzz-2.6.7/test/api/test-draw.c:179: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 str[1024]; data/harfbuzz-2.6.7/test/api/test-draw.c:240: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 str[1024]; data/harfbuzz-2.6.7/test/api/test-draw.c:263: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 str[1024]; data/harfbuzz-2.6.7/test/api/test-draw.c:287: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 str[1024]; data/harfbuzz-2.6.7/test/api/test-draw.c:323: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 str[1024]; data/harfbuzz-2.6.7/test/api/test-draw.c:411: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 str[2048]; data/harfbuzz-2.6.7/test/api/test-draw.c:526: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 str[2048]; data/harfbuzz-2.6.7/test/api/test-draw.c:759: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 str[2048]; data/harfbuzz-2.6.7/test/api/test-draw.c:820: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 str[2048]; data/harfbuzz-2.6.7/test/api/test-multithread.c:58: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 out[255]; data/harfbuzz-2.6.7/test/api/test-multithread.c:131:19: [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). num_threads = atoi (argv[2]); data/harfbuzz-2.6.7/test/api/test-multithread.c:133:17: [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). num_iters = atoi (argv[3]); data/harfbuzz-2.6.7/test/api/test-ot-face.c:43: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 buf[5] = {0}; data/harfbuzz-2.6.7/test/api/test-ot-glyphname.c:33: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 buf[64]; data/harfbuzz-2.6.7/test/api/test-ot-name.c:80: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 text[10]; data/harfbuzz-2.6.7/test/fuzzing/hb-draw-fuzzer.cc:95: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 buf[64]; data/harfbuzz-2.6.7/test/fuzzing/hb-shape-fuzzer.cc:45: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(text32, data + size - len, len); data/harfbuzz-2.6.7/util/ansi-print.cc:302:20: [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 *lower[7] = {"▁", "▂", "▃", "▄", "▅", "▆", "▇"}; data/harfbuzz-2.6.7/util/ansi-print.cc:334:20: [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 *left [7] = {"▏", "▎", "▍", "▌", "▋", "▊", "▉"}; data/harfbuzz-2.6.7/util/hb-ot-shape-closure.cc:85: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 glyph_name[64]; data/harfbuzz-2.6.7/util/hb-shape.cc:163: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 buf[4092]; data/harfbuzz-2.6.7/util/hb-shape.cc:169:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *args[32]; data/harfbuzz-2.6.7/util/hb-subset.cc:76: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_out = fopen(output_file, "wb"); data/harfbuzz-2.6.7/util/options.cc:37: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[4]; data/harfbuzz-2.6.7/util/options.cc:804:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen (text_file, "r"); data/harfbuzz-2.6.7/util/options.cc:816: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 buf[BUFSIZ]; data/harfbuzz-2.6.7/util/options.cc:841: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 (output_file, "wb"); data/harfbuzz-2.6.7/util/options.cc:943: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 buf[32768]; data/harfbuzz-2.6.7/src/hb-blob.cc:530: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). size_t name_len = strlen (file_name); data/harfbuzz-2.6.7/src/hb-blob.cc:536:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (rsrc_name, file_name, name_len); data/harfbuzz-2.6.7/src/hb-blob.cc:537:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (rsrc_name + name_len, _PATH_RSRCFORKSPEC, data/harfbuzz-2.6.7/src/hb-blob.cc:617: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). unsigned int size = strlen (file_name) + 1; data/harfbuzz-2.6.7/src/hb-buffer-serialize.cc:124: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). #define APPEND(s) HB_STMT_START { strcpy (p, s); p += strlen (s); } HB_STMT_END data/harfbuzz-2.6.7/src/hb-buffer-serialize.cc:228:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (p); data/harfbuzz-2.6.7/src/hb-buffer-serialize.cc:441:15: [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). buf_len = strlen (buf); data/harfbuzz-2.6.7/src/hb-buffer.cc:1523: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). text_length = utf_t::strlen (text); data/harfbuzz-2.6.7/src/hb-common.cc:66: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). p = c + strlen (c); data/harfbuzz-2.6.7/src/hb-common.cc:69: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 (0 == strncmp (c, name, p - c) && strlen (name) == static_cast<size_t>(p - c)) do { u.opts.symbol = true; } while (0) data/harfbuzz-2.6.7/src/hb-common.cc:256: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). size_t len = strlen(s) + 1; data/harfbuzz-2.6.7/src/hb-common.cc:897: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). len = strlen (str); data/harfbuzz-2.6.7/src/hb-common.cc:994: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). len = strlen (str); data/harfbuzz-2.6.7/src/hb-ft.cc:528:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (buf, name, len); data/harfbuzz-2.6.7/src/hb-ft.cc:686:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!ft_face->stream->read) { data/harfbuzz-2.6.7/src/hb-number.cc:38:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (buf, *pp, len); data/harfbuzz-2.6.7/src/hb-ot-tag.cc:189: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 (!ISALNUM (s[strlen (subtag)])) data/harfbuzz-2.6.7/src/hb-ot-tag.cc:191: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). lang_str = s + strlen (subtag); data/harfbuzz-2.6.7/src/hb-ot-tag.cc:198: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). unsigned int len = strlen (spec); data/harfbuzz-2.6.7/src/hb-ot-tag.cc:216: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). da = p ? (unsigned int) (p - a) : strlen (a); data/harfbuzz-2.6.7/src/hb-ot-tag.cc:219: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). db = p ? (unsigned int) (p - b) : strlen (b); data/harfbuzz-2.6.7/src/hb-ot-tag.cc:270: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). if (3 == (extlang_end ? extlang_end - s - 1 : strlen (s + 1)) && data/harfbuzz-2.6.7/src/hb-ot-tag.cc:292: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). s = lang_str + strlen (lang_str); data/harfbuzz-2.6.7/src/hb-ot-tag.cc:321: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). s += strlen (prefix); data/harfbuzz-2.6.7/src/hb-ot-tag.cc:512: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). size_t len = strlen (lang_str); data/harfbuzz-2.6.7/src/hb-shape-plan.cc:149:22: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. hb_shape_plan_key_t::equal (const hb_shape_plan_key_t *other) data/harfbuzz-2.6.7/src/hb-shape-plan.cc:154:12: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. this->ot.equal (&other->ot) && data/harfbuzz-2.6.7/src/hb-shape-plan.cc:482:33: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (node->shape_plan->key.equal (&key)) data/harfbuzz-2.6.7/src/hb-shaper.cc:67:12: [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). end = p + strlen (p); data/harfbuzz-2.6.7/src/hb-shaper.cc:70: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 (end - p == (int) strlen (shapers[j].name) && data/harfbuzz-2.6.7/src/main.cc:298: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). fwrite (font_name, 1, strlen (font_name), font_name_file); data/harfbuzz-2.6.7/src/test-number.cc:49: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). const char *end = str + strlen (str); data/harfbuzz-2.6.7/src/test-ot-glyphname.cc:62: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). if (hb_font_get_glyph_from_name(font, buf, strlen (buf), &gid_inv)) data/harfbuzz-2.6.7/test/api/test-buffer.c:398: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). bytes = strlen (test->utf8); data/harfbuzz-2.6.7/test/api/test-buffer.c:687: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). text_bytes = strlen (test->utf8); data/harfbuzz-2.6.7/test/api/test-ot-face.c:62:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). hb_font_get_glyph_from_name (font, buf, strlen (buf), &g); data/harfbuzz-2.6.7/util/hb-shape.cc:166: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). size_t l = strlen (buf); data/harfbuzz-2.6.7/util/options-subset.cc:100: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). char last_name_char = name[strlen (name) - 1]; data/harfbuzz-2.6.7/util/options-subset.cc:156: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). char last_name_char = name[strlen (name) - 1]; data/harfbuzz-2.6.7/util/options-subset.cc:212: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). char last_name_char = name[strlen (name) - 1]; data/harfbuzz-2.6.7/util/options-subset.cc:220: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 (s) > 4) // Table tags are at most 4 bytes. data/harfbuzz-2.6.7/util/options-subset.cc:227:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). hb_tag_t tag = hb_tag_from_string (s, strlen (s)); data/harfbuzz-2.6.7/util/options.cc:775: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). line_len = strlen (line); data/harfbuzz-2.6.7/util/options.cc:818: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). unsigned int bytes = strlen (buf); ANALYSIS SUMMARY: Hits = 152 Lines analyzed = 57676 in approximately 3.00 seconds (19254 lines/second) Physical Source Lines of Code (SLOC) = 36675 Hits@level = [0] 131 [1] 44 [2] 97 [3] 8 [4] 3 [5] 0 Hits@level+ = [0+] 283 [1+] 152 [2+] 108 [3+] 11 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 7.71643 [1+] 4.14451 [2+] 2.94479 [3+] 0.299932 [4+] 0.0817996 [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.