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/libtasn1-6-4.16.0/tests/object-id-encoding.c Examining data/libtasn1-6-4.16.0/tests/Test_overflow.c Examining data/libtasn1-6-4.16.0/tests/octet-string.c Examining data/libtasn1-6-4.16.0/tests/reproducers.c Examining data/libtasn1-6-4.16.0/tests/Test_encoding.c Examining data/libtasn1-6-4.16.0/tests/Test_choice_ocsp.c Examining data/libtasn1-6-4.16.0/tests/strict-der.c Examining data/libtasn1-6-4.16.0/tests/Test_tree_asn1_tab.c Examining data/libtasn1-6-4.16.0/tests/coding-long-oid.c Examining data/libtasn1-6-4.16.0/tests/Test_tree.c Examining data/libtasn1-6-4.16.0/tests/Test_errors.c Examining data/libtasn1-6-4.16.0/tests/coding-decoding2.c Examining data/libtasn1-6-4.16.0/tests/spc_pe_image_data.c Examining data/libtasn1-6-4.16.0/tests/Test_choice.c Examining data/libtasn1-6-4.16.0/tests/Test_indefinite.c Examining data/libtasn1-6-4.16.0/tests/object-id-decoding.c Examining data/libtasn1-6-4.16.0/tests/copynode.c Examining data/libtasn1-6-4.16.0/tests/setof.c Examining data/libtasn1-6-4.16.0/tests/Test_strings.c Examining data/libtasn1-6-4.16.0/tests/CVE-2018-1000654-1_asn1_tab.h Examining data/libtasn1-6-4.16.0/tests/CVE-2018-1000654.c Examining data/libtasn1-6-4.16.0/tests/ocsp-basic-response.c Examining data/libtasn1-6-4.16.0/tests/Test_parser.c Examining data/libtasn1-6-4.16.0/tests/Test_simple.c Examining data/libtasn1-6-4.16.0/tests/CVE-2018-1000654-2_asn1_tab.h Examining data/libtasn1-6-4.16.0/tests/Test_encdec.c Examining data/libtasn1-6-4.16.0/src/asn1Decoding.c Examining data/libtasn1-6-4.16.0/src/asn1Parser.c Examining data/libtasn1-6-4.16.0/src/benchmark.h Examining data/libtasn1-6-4.16.0/src/asn1Coding.c Examining data/libtasn1-6-4.16.0/src/benchmark.c Examining data/libtasn1-6-4.16.0/examples/CertificateExample.c Examining data/libtasn1-6-4.16.0/examples/pkix_asn1_tab.c Examining data/libtasn1-6-4.16.0/examples/CrlExample.c Examining data/libtasn1-6-4.16.0/windows/gnulib/getopt.h Examining data/libtasn1-6-4.16.0/windows/asn1-parser/config.h Examining data/libtasn1-6-4.16.0/fuzz/main.c Examining data/libtasn1-6-4.16.0/fuzz/libtasn1_gnutls_der_fuzzer.c Examining data/libtasn1-6-4.16.0/fuzz/libtasn1_array2tree_fuzzer.c Examining data/libtasn1-6-4.16.0/fuzz/libtasn1_pkix_der_fuzzer.c Examining data/libtasn1-6-4.16.0/fuzz/asn1_get_object_id_der_fuzzer.c Examining data/libtasn1-6-4.16.0/fuzz/asn1_decode_simple_der_fuzzer.c Examining data/libtasn1-6-4.16.0/fuzz/asn1_decode_simple_ber_fuzzer.c Examining data/libtasn1-6-4.16.0/fuzz/libtasn1_parser2tree_fuzzer.c Examining data/libtasn1-6-4.16.0/fuzz/fuzzer.h Examining data/libtasn1-6-4.16.0/fuzz/corpus2array.c Examining data/libtasn1-6-4.16.0/lib/parser_aux.c Examining data/libtasn1-6-4.16.0/lib/element.h Examining data/libtasn1-6-4.16.0/lib/includes/libtasn1.h Examining data/libtasn1-6-4.16.0/lib/decoding.c Examining data/libtasn1-6-4.16.0/lib/version.c Examining data/libtasn1-6-4.16.0/lib/coding.c Examining data/libtasn1-6-4.16.0/lib/gstr.h Examining data/libtasn1-6-4.16.0/lib/parser_aux.h Examining data/libtasn1-6-4.16.0/lib/errors.c Examining data/libtasn1-6-4.16.0/lib/gstr.c Examining data/libtasn1-6-4.16.0/lib/int.h Examining data/libtasn1-6-4.16.0/lib/structure.c Examining data/libtasn1-6-4.16.0/lib/structure.h Examining data/libtasn1-6-4.16.0/lib/element.c Examining data/libtasn1-6-4.16.0/lib/gl/strverscmp.c Examining data/libtasn1-6-4.16.0/lib/gl/intprops.h Examining data/libtasn1-6-4.16.0/lib/gl/stdbool.in.h Examining data/libtasn1-6-4.16.0/lib/gl/warn-on-use.h Examining data/libtasn1-6-4.16.0/lib/gl/limits.in.h Examining data/libtasn1-6-4.16.0/lib/gl/stdint.in.h Examining data/libtasn1-6-4.16.0/lib/gl/stddef.in.h Examining data/libtasn1-6-4.16.0/lib/gl/c-ctype.h Examining data/libtasn1-6-4.16.0/lib/gl/arg-nonnull.h Examining data/libtasn1-6-4.16.0/lib/gl/cdefs.h Examining data/libtasn1-6-4.16.0/lib/gl/minmax.h Examining data/libtasn1-6-4.16.0/lib/gl/libc-config.h Examining data/libtasn1-6-4.16.0/lib/gl/c++defs.h Examining data/libtasn1-6-4.16.0/lib/gl/sys_types.in.h Examining data/libtasn1-6-4.16.0/lib/gl/string.in.h Examining data/libtasn1-6-4.16.0/lib/gl/c-ctype.c Examining data/libtasn1-6-4.16.0/lib/ASN1.c FINAL RESULTS: data/libtasn1-6-4.16.0/examples/CertificateExample.c:87: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 (name, root); data/libtasn1-6-4.16.0/examples/CertificateExample.c:90:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (name, counter); data/libtasn1-6-4.16.0/examples/CertificateExample.c:98:4: [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 (name2, name); data/libtasn1-6-4.16.0/examples/CertificateExample.c:101:4: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (name2, counter); data/libtasn1-6-4.16.0/examples/CertificateExample.c:106:4: [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 (name3, name2); data/libtasn1-6-4.16.0/examples/CertificateExample.c:110:4: [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 (name3, name2); data/libtasn1-6-4.16.0/examples/CertificateExample.c:129:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (name3, str); data/libtasn1-6-4.16.0/examples/CertificateExample.c:134:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (answer, str); data/libtasn1-6-4.16.0/examples/CertificateExample.c:154:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (name3, str); data/libtasn1-6-4.16.0/examples/CertificateExample.c:159:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (answer, str); data/libtasn1-6-4.16.0/examples/CertificateExample.c:180:6: [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 (name3, str); data/libtasn1-6-4.16.0/examples/CertificateExample.c:185:6: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (answer, str); data/libtasn1-6-4.16.0/examples/CrlExample.c:90: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 (name, root); data/libtasn1-6-4.16.0/examples/CrlExample.c:93:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (name, counter); data/libtasn1-6-4.16.0/examples/CrlExample.c:102:4: [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 (name2, name); data/libtasn1-6-4.16.0/examples/CrlExample.c:105:4: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (name2, counter); data/libtasn1-6-4.16.0/examples/CrlExample.c:111:4: [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 (name3, name2); data/libtasn1-6-4.16.0/examples/CrlExample.c:116:4: [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 (name3, name2); data/libtasn1-6-4.16.0/examples/CrlExample.c:138:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (name3, str); data/libtasn1-6-4.16.0/examples/CrlExample.c:144:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (answer, str); data/libtasn1-6-4.16.0/examples/CrlExample.c:166:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (name3, str); data/libtasn1-6-4.16.0/examples/CrlExample.c:171:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (answer, str); data/libtasn1-6-4.16.0/examples/CrlExample.c:192:6: [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 (name3, str); data/libtasn1-6-4.16.0/examples/CrlExample.c:197:6: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (answer, str); data/libtasn1-6-4.16.0/fuzz/corpus2array.c:125:6: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(add ? "|%s" : ", %s", typename[i - 8]); data/libtasn1-6-4.16.0/fuzz/main.c:102:11: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. return system(cmd) != 0; data/libtasn1-6-4.16.0/fuzz/main.c:111:8: [4] (format) snprintf: 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. len = snprintf(corporadir, sizeof(corporadir), SRCDIR "/%s.in", target); data/libtasn1-6-4.16.0/fuzz/main.c:117:2: [4] (format) snprintf: 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. snprintf(corporadir, sizeof(corporadir), SRCDIR "/%s.repro", target); data/libtasn1-6-4.16.0/lib/ASN1.c:136:46: [4] (format) snprintf: 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. #define SAFE_COPY(dst, dst_size, fmt, ...) { snprintf(dst, dst_size, fmt, __VA_ARGS__); } data/libtasn1-6-4.16.0/lib/ASN1.c:139:14: [4] (format) snprintf: 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. int _ret = snprintf(dst, dst_size, fmt, __VA_ARGS__); \ data/libtasn1-6-4.16.0/lib/ASN1.c:935:21: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define YYFPRINTF fprintf data/libtasn1-6-4.16.0/lib/decoding.c:2008:4: [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 (name, definitions->name); data/libtasn1-6-4.16.0/lib/decoding.c:2010:4: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (name, p2->name); data/libtasn1-6-4.16.0/lib/decoding.c:2026:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (name, definitions->name); data/libtasn1-6-4.16.0/lib/decoding.c:2028:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (name, p2->name); data/libtasn1-6-4.16.0/lib/gstr.c:39:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (dest, src); data/libtasn1-6-4.16.0/lib/gstr.c:59: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 (dest, src); data/libtasn1-6-4.16.0/lib/int.h:117:27: [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 _asn1_strcpy(a,b) strcpy((char *)a, (const char *)b) data/libtasn1-6-4.16.0/lib/int.h:118:27: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). #define _asn1_strcat(a,b) strcat((char *)a, (const char *)b) data/libtasn1-6-4.16.0/src/asn1Coding.c:60:6: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf ("Report bugs to "PACKAGE_BUGREPORT); data/libtasn1-6-4.16.0/src/asn1Coding.c:75:9: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. ret = fscanf (file, "%s", varName); data/libtasn1-6-4.16.0/src/asn1Coding.c:81:9: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. ret = fscanf (file, "%s", value); data/libtasn1-6-4.16.0/src/asn1Coding.c:173:4: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(program_name" "PACKAGE" " VERSION"\n"); data/libtasn1-6-4.16.0/src/asn1Decoding.c:66:6: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf ("Report bugs to "PACKAGE_BUGREPORT); data/libtasn1-6-4.16.0/src/asn1Decoding.c:165:4: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(program_name" "PACKAGE" " VERSION"\n"); data/libtasn1-6-4.16.0/src/asn1Parser.c:61:6: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf ("Report bugs to "PACKAGE_BUGREPORT); data/libtasn1-6-4.16.0/src/asn1Parser.c:112:4: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(program_name" "PACKAGE" " VERSION"\n"); data/libtasn1-6-4.16.0/src/asn1Parser.c:165: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 (inputFileName, argv[optind]); data/libtasn1-6-4.16.0/fuzz/main.c:93:26: [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 *valgrind = getenv("TESTS_VALGRIND"); data/libtasn1-6-4.16.0/src/asn1Coding.c:161:2: [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. getopt_long (argc, argv, "hvco:", long_options, &option_index); data/libtasn1-6-4.16.0/src/asn1Decoding.c:142:2: [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. getopt_long (argc, argv, "hbdsvtc", long_options, &option_index); data/libtasn1-6-4.16.0/src/asn1Parser.c:93:2: [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. getopt_long (argc, argv, "hvco:n:", long_options, &option_index); data/libtasn1-6-4.16.0/tests/Test_choice.c:31:28: [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 *choicefile = getenv ("ASN1CHOICE"); data/libtasn1-6-4.16.0/tests/Test_choice_ocsp.c:12:28: [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 *choicefile = getenv ("ASN1CHOICE_OCSP"); data/libtasn1-6-4.16.0/tests/Test_choice_ocsp.c:13:26: [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 *datafile = getenv ("ASN1CHOICE_OCSP_DATA"); data/libtasn1-6-4.16.0/tests/Test_encdec.c:52:26: [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 *treefile = getenv ("ASN1PKIX"); data/libtasn1-6-4.16.0/tests/Test_encdec.c:53:25: [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 *derfile = getenv ("ASN1CRLDER"); data/libtasn1-6-4.16.0/tests/Test_encoding.c:43:26: [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 *treefile = getenv ("ASN1ENCODING"); data/libtasn1-6-4.16.0/tests/Test_indefinite.c:49:26: [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 *treefile = getenv ("ASN1PKIX"); data/libtasn1-6-4.16.0/tests/Test_indefinite.c:50:27: [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 *indeffile = getenv ("ASN1INDEF"); data/libtasn1-6-4.16.0/tests/Test_indefinite.c:51:28: [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 *indeffile2 = getenv ("ASN1INDEF2"); data/libtasn1-6-4.16.0/tests/Test_indefinite.c:52:28: [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 *indeffile3 = getenv ("ASN1INDEF3"); data/libtasn1-6-4.16.0/tests/Test_parser.c:170:21: [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. fileCorrectName = getenv ("ASN1PARSER"); data/libtasn1-6-4.16.0/tests/Test_tree.c:475:26: [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 *treefile = getenv ("ASN1TREE"); data/libtasn1-6-4.16.0/tests/coding-decoding2.c:31:28: [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 *choicefile = getenv ("ASN1CODINGDECODING2"); data/libtasn1-6-4.16.0/tests/coding-long-oid.c:152:26: [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 *pkixfile = getenv ("ASN1PKIX"); data/libtasn1-6-4.16.0/tests/copynode.c:52:26: [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 *treefile = getenv ("ASN1PKIX"); data/libtasn1-6-4.16.0/tests/copynode.c:53:25: [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 *derfile = getenv ("ASN1CRLDER"); data/libtasn1-6-4.16.0/tests/ocsp-basic-response.c:32:28: [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 *choicefile = getenv ("ASN1CHOICE_OCSP"); data/libtasn1-6-4.16.0/tests/ocsp-basic-response.c:33:26: [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 *datafile = getenv ("ASN1_RESPONSE_OCSP_DATA"); data/libtasn1-6-4.16.0/tests/setof.c:55:26: [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 *treefile = getenv ("ASN1SETOF"); data/libtasn1-6-4.16.0/tests/spc_pe_image_data.c:31:27: [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 *choicefile = getenv ("ASN1_MSCAT"); data/libtasn1-6-4.16.0/tests/spc_pe_image_data.c:32:25: [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 *datafile = getenv ("ASN1_SPC_PE_IMAGE_DATA"); data/libtasn1-6-4.16.0/tests/strict-der.c:39:26: [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 *treefile = getenv ("ASN1PKIX"); data/libtasn1-6-4.16.0/tests/strict-der.c:40:27: [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 *indeffile = getenv ("ASN1INDEF"); data/libtasn1-6-4.16.0/examples/CertificateExample.c:37: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 temp[20]; data/libtasn1-6-4.16.0/examples/CertificateExample.c:79: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 name[128], str[1024], str2[1024], name2[128], counter[5], name3[128]; data/libtasn1-6-4.16.0/examples/CertificateExample.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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/examples/CertificateExample.c:88:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (name, ".rdnSequence.?"); data/libtasn1-6-4.16.0/examples/CertificateExample.c:99:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (name2, ".?"); data/libtasn1-6-4.16.0/examples/CertificateExample.c:107:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (name3, ".type"); data/libtasn1-6-4.16.0/examples/CertificateExample.c:111:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (name3, ".value"); data/libtasn1-6-4.16.0/examples/CertificateExample.c:133:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (answer, " C="); data/libtasn1-6-4.16.0/examples/CertificateExample.c:158:9: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (answer, " O="); data/libtasn1-6-4.16.0/examples/CertificateExample.c:184:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (answer, " OU="); data/libtasn1-6-4.16.0/examples/CertificateExample.c:213: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 str[1024]; data/libtasn1-6-4.16.0/examples/CertificateExample.c:219: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/examples/CertificateExample.c:572: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 str[1024], str2[1024]; data/libtasn1-6-4.16.0/examples/CertificateExample.c:574: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/examples/CertificateExample.c:640: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 der[1024]; data/libtasn1-6-4.16.0/examples/CertificateExample.c:642: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/examples/CrlExample.c:38: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 temp[20]; data/libtasn1-6-4.16.0/examples/CrlExample.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 name[128], str[1024], str2[1024], name2[128], counter[5], name3[128]; data/libtasn1-6-4.16.0/examples/CrlExample.c:83: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/examples/CrlExample.c:91:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (name, ".rdnSequence.?"); data/libtasn1-6-4.16.0/examples/CrlExample.c:103:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (name2, ".?"); data/libtasn1-6-4.16.0/examples/CrlExample.c:112:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (name3, ".type"); data/libtasn1-6-4.16.0/examples/CrlExample.c:117:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (name3, ".value"); data/libtasn1-6-4.16.0/examples/CrlExample.c:143:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (answer, " C="); data/libtasn1-6-4.16.0/examples/CrlExample.c:170:9: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (answer, " O="); data/libtasn1-6-4.16.0/examples/CrlExample.c:196:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (answer, " OU="); data/libtasn1-6-4.16.0/examples/CrlExample.c:225: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 str[1024]; data/libtasn1-6-4.16.0/examples/CrlExample.c:229: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/examples/CrlExample.c:443: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 str[1024], str2[1024]; data/libtasn1-6-4.16.0/examples/CrlExample.c:445: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/examples/CrlExample.c:507: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 der[1024]; data/libtasn1-6-4.16.0/examples/CrlExample.c:509: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/fuzz/asn1_get_object_id_der_fuzzer.c:31: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 str[256]; data/libtasn1-6-4.16.0/fuzz/corpus2array.c:39: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[20]; data/libtasn1-6-4.16.0/fuzz/corpus2array.c:40: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 value[20]; data/libtasn1-6-4.16.0/fuzz/corpus2array.c:45: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. static char out[19 * 6 + 1]; data/libtasn1-6-4.16.0/fuzz/corpus2array.c:51: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(p, "\\u%04x", *s++); data/libtasn1-6-4.16.0/fuzz/corpus2array.c:54: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(p, "\\x%02x", *s++); data/libtasn1-6-4.16.0/fuzz/corpus2array.c:58:4: [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(p, "\\n"); data/libtasn1-6-4.16.0/fuzz/corpus2array.c:62:4: [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(p, "\\t"); data/libtasn1-6-4.16.0/fuzz/corpus2array.c:73: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 *typename[24] = { data/libtasn1-6-4.16.0/fuzz/libtasn1_array2tree_fuzzer.c:41: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[NAMESIZE]; data/libtasn1-6-4.16.0/fuzz/libtasn1_array2tree_fuzzer.c:42: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 value[VALUESIZE]; data/libtasn1-6-4.16.0/fuzz/libtasn1_array2tree_fuzzer.c:55: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(elem, data, size); data/libtasn1-6-4.16.0/fuzz/libtasn1_array2tree_fuzzer.c:81: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/fuzz/libtasn1_parser2tree_fuzzer.c:38:7: [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 *fopen(const char *pathname, const char *mode) { data/libtasn1-6-4.16.0/fuzz/libtasn1_parser2tree_fuzzer.c:52: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/fuzz/main.c:46: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 fname[1024]; data/libtasn1-6-4.16.0/fuzz/main.c:60: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). if ((fd = open(fname, O_RDONLY)) == -1) { data/libtasn1-6-4.16.0/fuzz/main.c:96:4: [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 cmd[1024]; /* avoid alloca / VLA / heap allocation */ data/libtasn1-6-4.16.0/fuzz/main.c:109: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 corporadir[1024]; /* avoid alloca / VLA / heap allocation */ data/libtasn1-6-4.16.0/fuzz/main.c:143: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 buf[64 * 1024]; data/libtasn1-6-4.16.0/lib/ASN1.c:124: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. static char last_error[ASN1_MAX_ERROR_DESCRIPTION_SIZE] = ""; data/libtasn1-6-4.16.0/lib/ASN1.c:125: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. static char last_error_token[ASN1_MAX_ERROR_DESCRIPTION_SIZE+1] = ""; /* used when expected errors occur */ data/libtasn1-6-4.16.0/lib/ASN1.c:126: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. static char last_token[ASN1_MAX_NAME_SIZE+1] = ""; /* last token find in the file data/libtasn1-6-4.16.0/lib/ASN1.c:296: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[ASN1_MAX_NAME_SIZE+1]; data/libtasn1-6-4.16.0/lib/ASN1.c:1186: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; data/libtasn1-6-4.16.0/lib/ASN1.c:1375: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 yymsgbuf[128]; data/libtasn1-6-4.16.0/lib/ASN1.c:2700: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 string[ASN1_MAX_NAME_SIZE + 1]; /* will contain the next token */ data/libtasn1-6-4.16.0/lib/ASN1.c:2867: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_asn1 = fopen (file, "r"); data/libtasn1-6-4.16.0/lib/ASN1.c:2957: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_asn1 = fopen (inputFileName, "r"); data/libtasn1-6-4.16.0/lib/ASN1.c:3007: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 (file_out_name, inputFileName, data/libtasn1-6-4.16.0/lib/ASN1.c:3010:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (file_out_name, "_asn1_tab.c"); data/libtasn1-6-4.16.0/lib/ASN1.c:3024: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 (vector_name, slash_p, dot_p - slash_p); data/libtasn1-6-4.16.0/lib/ASN1.c:3026:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (vector_name, "_asn1_tab"); data/libtasn1-6-4.16.0/lib/coding.c:78: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 temp[ASN1_MAX_LENGTH_SIZE]; data/libtasn1-6-4.16.0/lib/coding.c:123:25: [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. _asn1_tag_der (unsigned char class, unsigned int tag_value, data/libtasn1-6-4.16.0/lib/coding.c:124: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. unsigned char ans[ASN1_MAX_TAG_SIZE], int *ans_len) data/libtasn1-6-4.16.0/lib/coding.c:127: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 temp[ASN1_MAX_TAG_SIZE]; data/libtasn1-6-4.16.0/lib/coding.c:182: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 (der + len_len, str, str_len); data/libtasn1-6-4.16.0/lib/coding.c:211: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 der_tag[ASN1_MAX_TAG_SIZE]; data/libtasn1-6-4.16.0/lib/coding.c:212: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 der_length[ASN1_MAX_LENGTH_SIZE]; data/libtasn1-6-4.16.0/lib/coding.c:238: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 (p, der_tag, tag_len); data/libtasn1-6-4.16.0/lib/coding.c:240: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 (p, der_length, len_len); data/libtasn1-6-4.16.0/lib/coding.c:276: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 (der + len_len, str, str_len); data/libtasn1-6-4.16.0/lib/coding.c:378: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 (temp, str, str_len); data/libtasn1-6-4.16.0/lib/coding.c:451: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 tag_der[MAX_TAG_LEN]; data/libtasn1-6-4.16.0/lib/coding.c:462: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(der, tag_der, tag_len); data/libtasn1-6-4.16.0/lib/coding.c:517: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 (der + len_len + 1, str, len_byte); data/libtasn1-6-4.16.0/lib/coding.c:543: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 temp[SIZEOF_UNSIGNED_INT]; data/libtasn1-6-4.16.0/lib/coding.c:576: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 (der + len2, temp, len3); data/libtasn1-6-4.16.0/lib/coding.c:674: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 tag_der[MAX_TAG_LEN]; data/libtasn1-6-4.16.0/lib/coding.c:706: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 (der + *counter, tag_der, tag_len); data/libtasn1-6-4.16.0/lib/coding.c:758: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 (der + *counter, tag_der, tag_len); data/libtasn1-6-4.16.0/lib/coding.c:867: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 (temp, der + counter, p_vet->end - counter); data/libtasn1-6-4.16.0/lib/coding.c:868: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 (der + counter, der + p_vet->end, data/libtasn1-6-4.16.0/lib/coding.c:870: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 (der + counter + p2_vet->end - p_vet->end, temp, data/libtasn1-6-4.16.0/lib/coding.c:1044: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(out+counter, p_vet->ptr, p_vet->size); data/libtasn1-6-4.16.0/lib/coding.c:1047: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(der, out, der_len); data/libtasn1-6-4.16.0/lib/coding.c:1083: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 temp[MAX(LTOSTR_MAX_SIZE, SIZEOF_UNSIGNED_LONG_INT * 3 + 1)]; data/libtasn1-6-4.16.0/lib/coding.c:1186: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 (der + counter, p->value, len3 + len2); data/libtasn1-6-4.16.0/lib/coding.c:1258:6: [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 (der + counter, p->value, len3 + len2); data/libtasn1-6-4.16.0/lib/coding.c:1302: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 (der + len2, temp, len3); data/libtasn1-6-4.16.0/lib/coding.c:1343: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 (der + len2, temp, len3); data/libtasn1-6-4.16.0/lib/coding.c:1364:6: [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 (der + counter, p->value + len3, len2); data/libtasn1-6-4.16.0/lib/decoding.c:300: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 (str, der + len_len, *str_len); data/libtasn1-6-4.16.0/lib/decoding.c:388: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 (str, der + len_len, str_len); data/libtasn1-6-4.16.0/lib/decoding.c:414: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 temp[LTOSTR_MAX_SIZE]; data/libtasn1-6-4.16.0/lib/decoding.c:538: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 (str, der + len_len + 1, len_byte); data/libtasn1-6-4.16.0/lib/decoding.c:919: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 temp[128]; data/libtasn1-6-4.16.0/lib/decoding.c:1741: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 name[2 * ASN1_MAX_NAME_SIZE + 2], data/libtasn1-6-4.16.0/lib/decoding.c:1747: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/lib/decoding.c:1971: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 name[2 * ASN1_MAX_NAME_SIZE + 1], value[ASN1_MAX_NAME_SIZE]; data/libtasn1-6-4.16.0/lib/decoding.c:1977: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/lib/decoding.c:2193: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(*dst + *dst_size, src, src_size); data/libtasn1-6-4.16.0/lib/element.c:40: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 tmp_name[64]; data/libtasn1-6-4.16.0/lib/element.c:82: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 val[SIZEOF_UNSIGNED_LONG_INT]; data/libtasn1-6-4.16.0/lib/element.c:145: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 temp[LTOSTR_MAX_SIZE]; data/libtasn1-6-4.16.0/lib/element.c:425:4: [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 (value_temp, value, len); data/libtasn1-6-4.16.0/lib/element.c:656: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 (ptr, data, data_size); \ data/libtasn1-6-4.16.0/lib/element.c:678: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 (ptr, data, data_size); \ data/libtasn1-6-4.16.0/lib/gstr.c:67:4: [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 (dest, src, str_size); data/libtasn1-6-4.16.0/lib/int.h:48: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 name[ASN1_MAX_NAME_SIZE + 1]; /* Node name */ data/libtasn1-6-4.16.0/lib/int.h:57: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 small_value[ASN1_SMALL_VALUE_SIZE]; /* For small values */ data/libtasn1-6-4.16.0/lib/parser_aux.c:31:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char _asn1_identifierMissing[ASN1_MAX_NAME_SIZE + 1]; /* identifier name not found */ data/libtasn1-6-4.16.0/lib/parser_aux.c:126: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 *n_end, n[ASN1_MAX_NAME_SIZE + 1]; data/libtasn1-6-4.16.0/lib/parser_aux.c:155:4: [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 (n, n_start, nsize); data/libtasn1-6-4.16.0/lib/parser_aux.c:196:4: [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 (n, n_start, nsize); data/libtasn1-6-4.16.0/lib/parser_aux.c:280: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 (node->value, value, len); data/libtasn1-6-4.16.0/lib/parser_aux.c:374: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 (node->value, node->small_value, prev_len); data/libtasn1-6-4.16.0/lib/parser_aux.c:376: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 (&node->value[prev_len], value, len); data/libtasn1-6-4.16.0/lib/parser_aux.c:393: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 (&node->value[prev_len], value, len); data/libtasn1-6-4.16.0/lib/parser_aux.c:614:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char * data/libtasn1-6-4.16.0/lib/parser_aux.c:615:26: [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. _asn1_ltostr (int64_t v, char str[LTOSTR_MAX_SIZE]) data/libtasn1-6-4.16.0/lib/parser_aux.c:618: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 temp[LTOSTR_MAX_SIZE]; data/libtasn1-6-4.16.0/lib/parser_aux.c:666: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 val[SIZEOF_UNSIGNED_LONG_INT]; data/libtasn1-6-4.16.0/lib/parser_aux.c:667: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 val2[SIZEOF_UNSIGNED_LONG_INT + 1]; data/libtasn1-6-4.16.0/lib/parser_aux.c:735: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 name_root[ASN1_MAX_NAME_SIZE], name2[2 * ASN1_MAX_NAME_SIZE + 1]; data/libtasn1-6-4.16.0/lib/parser_aux.c:1017: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 name2[ASN1_MAX_NAME_SIZE * 2 + 2]; data/libtasn1-6-4.16.0/lib/parser_aux.h:70:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *_asn1_ltostr (int64_t v, char str[LTOSTR_MAX_SIZE]); data/libtasn1-6-4.16.0/lib/parser_aux.h:70:32: [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 *_asn1_ltostr (int64_t v, char str[LTOSTR_MAX_SIZE]); data/libtasn1-6-4.16.0/lib/structure.c:88: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). file = fopen (output_file_name, "w"); data/libtasn1-6-4.16.0/lib/structure.c:581: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 name2[ASN1_MAX_NAME_SIZE + 2]; data/libtasn1-6-4.16.0/lib/structure.c:1117: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 name[2 * ASN1_MAX_NAME_SIZE + 2]; data/libtasn1-6-4.16.0/lib/structure.c:1118: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 value[ASN1_MAX_NAME_SIZE]; data/libtasn1-6-4.16.0/src/asn1Coding.c:120: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 (*outputFileName, inputFileName, dot_p - inputFileName); data/libtasn1-6-4.16.0/src/asn1Coding.c:122:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (*outputFileName, ".out"); data/libtasn1-6-4.16.0/src/asn1Coding.c:144: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/src/asn1Coding.c:148: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 varName[1024]; data/libtasn1-6-4.16.0/src/asn1Coding.c:149: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 value[1024]; data/libtasn1-6-4.16.0/src/asn1Coding.c:254: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). inputFile = fopen (inputFileAssignmentName, "r"); data/libtasn1-6-4.16.0/src/asn1Coding.c:355: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). outputFile = fopen (outputFileName, "w"); data/libtasn1-6-4.16.0/src/asn1Decoding.c:83:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(file, "rb"); data/libtasn1-6-4.16.0/src/asn1Decoding.c:129: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/src/asn1Decoding.c:303: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/src/asn1Parser.c:84: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/src/asn1Parser.c:164:24: [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. inputFileName = (char *) malloc (strlen (argv[optind]) + 1); data/libtasn1-6-4.16.0/src/benchmark.c:57:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (metric, "KB"); data/libtasn1-6-4.16.0/src/benchmark.c:64:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (metric, "MB"); data/libtasn1-6-4.16.0/src/benchmark.c:71:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (metric, "GB"); data/libtasn1-6-4.16.0/src/benchmark.c:78:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (metric, "bytes"); data/libtasn1-6-4.16.0/src/benchmark.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 imetric[16]; data/libtasn1-6-4.16.0/tests/CVE-2018-1000654.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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/tests/Test_choice.c:30: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/tests/Test_choice.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 data[1024]; data/libtasn1-6-4.16.0/tests/Test_choice_ocsp.c:11: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/tests/Test_choice_ocsp.c:15: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 data[1024]; data/libtasn1-6-4.16.0/tests/Test_choice_ocsp.c:16: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 data2[1024]; data/libtasn1-6-4.16.0/tests/Test_choice_ocsp.c:40:8: [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(datafile, "rb"); data/libtasn1-6-4.16.0/tests/Test_encdec.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 buffer[5 * 1024]; data/libtasn1-6-4.16.0/tests/Test_encdec.c:44: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 buffer2[5 * 1024]; data/libtasn1-6-4.16.0/tests/Test_encdec.c:47: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/tests/Test_encdec.c:88:8: [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). fd = fopen (derfile, "rb"); data/libtasn1-6-4.16.0/tests/Test_encoding.c:32:10: [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[256]; data/libtasn1-6-4.16.0/tests/Test_encoding.c:42: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/tests/Test_indefinite.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 buffer[10 * 1024]; data/libtasn1-6-4.16.0/tests/Test_indefinite.c:46: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/tests/Test_indefinite.c:93:8: [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). fd = fopen (indeffile, "rb"); data/libtasn1-6-4.16.0/tests/Test_indefinite.c:128:8: [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). fd = fopen (indeffile2, "rb"); data/libtasn1-6-4.16.0/tests/Test_indefinite.c:163:8: [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). fd = fopen (indeffile3, "rb"); data/libtasn1-6-4.16.0/tests/Test_overflow.c:64: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. unsigned char der[20]; data/libtasn1-6-4.16.0/tests/Test_overflow.c:90: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 der[20]; data/libtasn1-6-4.16.0/tests/Test_overflow.c:117: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 der[20]; data/libtasn1-6-4.16.0/tests/Test_overflow.c:144: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 der[20]; data/libtasn1-6-4.16.0/tests/Test_parser.c:137: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 lineRead[1024]; data/libtasn1-6-4.16.0/tests/Test_parser.c:140: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). fileIn = fopen (fileCorrectName, "r"); data/libtasn1-6-4.16.0/tests/Test_parser.c:141: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). fileOut = fopen (fileErroredName, "w"); data/libtasn1-6-4.16.0/tests/Test_parser.c:162: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/tests/Test_simple.c:83: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 der[100]; data/libtasn1-6-4.16.0/tests/Test_simple.c:84: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 str[100]; data/libtasn1-6-4.16.0/tests/Test_simple.c:106:37: [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. asn1_bit_der ((const unsigned char *) tv[i].bitstr, tv[i].bitlen, data/libtasn1-6-4.16.0/tests/Test_simple.c:146: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 (der, "\x04\x06\x6e\x5d\xc0", 5); data/libtasn1-6-4.16.0/tests/Test_simple.c:167: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 (der, "\x04\x06\x6e\x5d\xe0", 5); data/libtasn1-6-4.16.0/tests/Test_simple.c:188: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 (der, "\x81\x04\x06\x6e\x5d\xc0", 6); data/libtasn1-6-4.16.0/tests/Test_strings.c:77: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 tl[ASN1_MAX_TL_SIZE]; data/libtasn1-6-4.16.0/tests/Test_tree.c:466: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/tests/Test_tree.c:470: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 value[1024], der[1024]; data/libtasn1-6-4.16.0/tests/Test_tree.c:512:11: [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). out = fopen ("Test_tree.out", "w"); data/libtasn1-6-4.16.0/tests/Test_tree.c:632:4: [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 (der, test->par1, der_len); data/libtasn1-6-4.16.0/tests/coding-decoding2.c:30: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/tests/coding-decoding2.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 data[1024]; data/libtasn1-6-4.16.0/tests/coding-long-oid.c:144:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char new_data[4*1024]; data/libtasn1-6-4.16.0/tests/coding-long-oid.c:151: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/tests/copynode.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 buffer[5 * 1024]; data/libtasn1-6-4.16.0/tests/copynode.c:44: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 buffer2[5 * 1024]; data/libtasn1-6-4.16.0/tests/copynode.c:47: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/tests/copynode.c:88:8: [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). fd = fopen (derfile, "rb"); data/libtasn1-6-4.16.0/tests/object-id-decoding.c:77: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[128]; data/libtasn1-6-4.16.0/tests/object-id-encoding.c:87: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 der[128]; data/libtasn1-6-4.16.0/tests/ocsp-basic-response.c:31: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/tests/ocsp-basic-response.c:35: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 data[1024]; data/libtasn1-6-4.16.0/tests/ocsp-basic-response.c:59:8: [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(datafile, "rb"); data/libtasn1-6-4.16.0/tests/octet-string.c:115: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 str[100]; data/libtasn1-6-4.16.0/tests/octet-string.c:116: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 der[100]; data/libtasn1-6-4.16.0/tests/reproducers.c:60: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/tests/setof.c:44:17: [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 unsigned char data[1024]; data/libtasn1-6-4.16.0/tests/setof.c:54: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/tests/spc_pe_image_data.c:30: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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/tests/spc_pe_image_data.c:34: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 data[1024]; data/libtasn1-6-4.16.0/tests/spc_pe_image_data.c:61:7: [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(datafile, "rb"); data/libtasn1-6-4.16.0/tests/strict-der.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 buffer[10 * 1024]; data/libtasn1-6-4.16.0/tests/strict-der.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 errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; data/libtasn1-6-4.16.0/tests/strict-der.c:75:8: [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). fd = fopen (indeffile, "rb"); data/libtasn1-6-4.16.0/fuzz/main.c:74:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((n = read(fd, data, st.st_size)) == st.st_size) { data/libtasn1-6-4.16.0/lib/ASN1.c:140: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). if (_ret != (int)strlen(dst)) \ data/libtasn1-6-4.16.0/lib/ASN1.c:1083: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). # define yystrlen strlen data/libtasn1-6-4.16.0/lib/ASN1.c:1665:85: [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). _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} data/libtasn1-6-4.16.0/lib/ASN1.c:1673:85: [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). _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} data/libtasn1-6-4.16.0/lib/ASN1.c:1693:80: [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). _asn1_set_value((yyval.node),(yyvsp[0].str),strlen((yyvsp[0].str))+1);} data/libtasn1-6-4.16.0/lib/ASN1.c:1701:82: [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). _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} data/libtasn1-6-4.16.0/lib/ASN1.c:1739:74: [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). _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} data/libtasn1-6-4.16.0/lib/ASN1.c:1746:78: [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). _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} data/libtasn1-6-4.16.0/lib/ASN1.c:1771:84: [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). _asn1_set_value((yyval.node),(yyvsp[0].str),strlen((yyvsp[0].str))+1);} data/libtasn1-6-4.16.0/lib/ASN1.c:1978:82: [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). _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} data/libtasn1-6-4.16.0/lib/ASN1.c:2030:84: [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). _asn1_set_value((yyval.node),(yyvsp[0].str),strlen((yyvsp[0].str))+1);} data/libtasn1-6-4.16.0/lib/ASN1.c:2037:85: [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). _asn1_set_value((yyval.node),(yyvsp[-1].str),strlen((yyvsp[-1].str))+1);} data/libtasn1-6-4.16.0/lib/ASN1.c:2353:71: [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). _asn1_set_value((yyval.node),(yyvsp[-4].str),strlen((yyvsp[-4].str))+1); data/libtasn1-6-4.16.0/lib/ASN1.c:2362:70: [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). _asn1_set_value((yyval.node),(yyvsp[0].str),strlen((yyvsp[0].str))+1);} data/libtasn1-6-4.16.0/lib/ASN1.c:2705:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc (file_asn1)) == ' ' || c == '\t' || c == '\n') data/libtasn1-6-4.16.0/lib/ASN1.c:2725:20: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((c = fgetc (file_asn1)) != '-') data/libtasn1-6-4.16.0/lib/ASN1.c:2737:27: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc (file_asn1)) != EOF && c != '\n' && data/libtasn1-6-4.16.0/lib/ASN1.c:2756:20: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ((c = fgetc (file_asn1)) == EOF || c == ' ' || c == '\t' data/libtasn1-6-4.16.0/lib/ASN1.c:2994: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). dot_p = inputFileName + strlen (inputFileName); data/libtasn1-6-4.16.0/lib/ASN1.c:3028: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). len = strlen(vector_name); data/libtasn1-6-4.16.0/lib/coding.c:56: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). _asn1_hierarchical_name (node, ErrorDescription + strlen (ErrorDescription), data/libtasn1-6-4.16.0/lib/decoding.c:92: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). _asn1_hierarchical_name (node, ErrorDescription + strlen (ErrorDescription), data/libtasn1-6-4.16.0/lib/decoding.c:1177: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). tlen = strlen (temp); data/libtasn1-6-4.16.0/lib/decoding.c:1197: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). tlen = strlen (temp); data/libtasn1-6-4.16.0/lib/decoding.c:2009:4: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat (name, "."); data/libtasn1-6-4.16.0/lib/decoding.c:2027:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat (name, "."); data/libtasn1-6-4.16.0/lib/gl/string.in.h:411: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/libtasn1-6-4.16.0/lib/gl/string.in.h:412: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/libtasn1-6-4.16.0/lib/gl/string.in.h:414: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/libtasn1-6-4.16.0/lib/gl/string.in.h:416: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/libtasn1-6-4.16.0/lib/gl/string.in.h:418: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/libtasn1-6-4.16.0/lib/gl/string.in.h:420: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/libtasn1-6-4.16.0/lib/gl/string.in.h:422: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/libtasn1-6-4.16.0/lib/gl/string.in.h:424: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/libtasn1-6-4.16.0/lib/gstr.c:34: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 str_size = strlen (src); data/libtasn1-6-4.16.0/lib/gstr.c:35: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). size_t dest_size = strlen (dest); data/libtasn1-6-4.16.0/lib/gstr.c:45:4: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat (dest, src, (dest_tot_size - dest_size) - 1); data/libtasn1-6-4.16.0/lib/gstr.c:55: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 str_size = strlen (src); data/libtasn1-6-4.16.0/lib/int.h:113: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). #define _asn1_strlen(s) strlen((const char *) s) data/libtasn1-6-4.16.0/lib/parser_aux.c:891: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). tlen = strlen (name2); data/libtasn1-6-4.16.0/lib/structure.c:203:38: [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). _asn1_set_value (p, array[k].value, strlen (array[k].value) + 1); data/libtasn1-6-4.16.0/src/asn1Coding.c:103: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). dot_p = inputFileName + strlen (inputFileName); data/libtasn1-6-4.16.0/src/asn1Coding.c:113: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). strlen (".out")); data/libtasn1-6-4.16.0/src/asn1Parser.c:164:40: [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). inputFileName = (char *) malloc (strlen (argv[optind]) + 1); data/libtasn1-6-4.16.0/tests/Test_parser.c:122:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (((c = fgetc (file)) != EOF) && (c != '\n')) ANALYSIS SUMMARY: Hits = 334 Lines analyzed = 25333 in approximately 0.96 seconds (26482 lines/second) Physical Source Lines of Code (SLOC) = 17838 Hits@level = [0] 527 [1] 46 [2] 213 [3] 27 [4] 48 [5] 0 Hits@level+ = [0+] 861 [1+] 334 [2+] 288 [3+] 75 [4+] 48 [5+] 0 Hits/KSLOC@level+ = [0+] 48.2677 [1+] 18.7241 [2+] 16.1453 [3+] 4.20451 [4+] 2.69088 [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.