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/asn1c-0.9.28+dfsg/skeletons/asn_SET_OF.h Examining data/asn1c-0.9.28+dfsg/skeletons/per_encoder.c Examining data/asn1c-0.9.28+dfsg/skeletons/constr_SEQUENCE.h Examining data/asn1c-0.9.28+dfsg/skeletons/NativeInteger.c Examining data/asn1c-0.9.28+dfsg/skeletons/xer_support.c Examining data/asn1c-0.9.28+dfsg/skeletons/per_support.c Examining data/asn1c-0.9.28+dfsg/skeletons/constr_TYPE.h Examining data/asn1c-0.9.28+dfsg/skeletons/ENUMERATED.c Examining data/asn1c-0.9.28+dfsg/skeletons/REAL.h Examining data/asn1c-0.9.28+dfsg/skeletons/NativeReal.h Examining data/asn1c-0.9.28+dfsg/skeletons/GeneralString.h Examining data/asn1c-0.9.28+dfsg/skeletons/asn_codecs.h Examining data/asn1c-0.9.28+dfsg/skeletons/per_decoder.c Examining data/asn1c-0.9.28+dfsg/skeletons/IA5String.h Examining data/asn1c-0.9.28+dfsg/skeletons/GraphicString.h Examining data/asn1c-0.9.28+dfsg/skeletons/BMPString.c Examining data/asn1c-0.9.28+dfsg/skeletons/constraints.c Examining data/asn1c-0.9.28+dfsg/skeletons/ISO646String.c Examining data/asn1c-0.9.28+dfsg/skeletons/xer_encoder.h Examining data/asn1c-0.9.28+dfsg/skeletons/UniversalString.h Examining data/asn1c-0.9.28+dfsg/skeletons/constraints.h Examining data/asn1c-0.9.28+dfsg/skeletons/T61String.h Examining data/asn1c-0.9.28+dfsg/skeletons/NativeEnumerated.h Examining data/asn1c-0.9.28+dfsg/skeletons/ber_decoder.c Examining data/asn1c-0.9.28+dfsg/skeletons/per_encoder.h Examining data/asn1c-0.9.28+dfsg/skeletons/BOOLEAN.c Examining data/asn1c-0.9.28+dfsg/skeletons/UTCTime.h Examining data/asn1c-0.9.28+dfsg/skeletons/REAL.c Examining data/asn1c-0.9.28+dfsg/skeletons/ber_tlv_length.h Examining data/asn1c-0.9.28+dfsg/skeletons/constr_SET.c Examining data/asn1c-0.9.28+dfsg/skeletons/asn_codecs_prim.c Examining data/asn1c-0.9.28+dfsg/skeletons/asn_codecs_prim.h Examining data/asn1c-0.9.28+dfsg/skeletons/per_opentype.h Examining data/asn1c-0.9.28+dfsg/skeletons/der_encoder.c Examining data/asn1c-0.9.28+dfsg/skeletons/asn_SET_OF.c Examining data/asn1c-0.9.28+dfsg/skeletons/asn_SEQUENCE_OF.h Examining data/asn1c-0.9.28+dfsg/skeletons/NumericString.h Examining data/asn1c-0.9.28+dfsg/skeletons/BOOLEAN.h Examining data/asn1c-0.9.28+dfsg/skeletons/UniversalString.c Examining data/asn1c-0.9.28+dfsg/skeletons/xer_decoder.c Examining data/asn1c-0.9.28+dfsg/skeletons/constr_CHOICE.c Examining data/asn1c-0.9.28+dfsg/skeletons/BIT_STRING.c Examining data/asn1c-0.9.28+dfsg/skeletons/xer_encoder.c Examining data/asn1c-0.9.28+dfsg/skeletons/NativeInteger.h Examining data/asn1c-0.9.28+dfsg/skeletons/PrintableString.c Examining data/asn1c-0.9.28+dfsg/skeletons/OBJECT_IDENTIFIER.c Examining data/asn1c-0.9.28+dfsg/skeletons/GeneralizedTime.c Examining data/asn1c-0.9.28+dfsg/skeletons/tests/check-OIDs.c Examining data/asn1c-0.9.28+dfsg/skeletons/tests/check-OCTET_STRING.c Examining data/asn1c-0.9.28+dfsg/skeletons/tests/check-GeneralizedTime.c Examining data/asn1c-0.9.28+dfsg/skeletons/tests/check-XER.c Examining data/asn1c-0.9.28+dfsg/skeletons/tests/check-ber_tlv_tag.c Examining data/asn1c-0.9.28+dfsg/skeletons/tests/check-INTEGER.c Examining data/asn1c-0.9.28+dfsg/skeletons/tests/check-PER-INTEGER.c Examining data/asn1c-0.9.28+dfsg/skeletons/tests/check-UTCTime.c Examining data/asn1c-0.9.28+dfsg/skeletons/tests/check-PER.c Examining data/asn1c-0.9.28+dfsg/skeletons/tests/check-length.c Examining data/asn1c-0.9.28+dfsg/skeletons/tests/check-UTF8String.c Examining data/asn1c-0.9.28+dfsg/skeletons/tests/check-REAL.c Examining data/asn1c-0.9.28+dfsg/skeletons/asn_internal.h Examining data/asn1c-0.9.28+dfsg/skeletons/OCTET_STRING.c Examining data/asn1c-0.9.28+dfsg/skeletons/NumericString.c Examining data/asn1c-0.9.28+dfsg/skeletons/NULL.h Examining data/asn1c-0.9.28+dfsg/skeletons/BMPString.h Examining data/asn1c-0.9.28+dfsg/skeletons/UTF8String.c Examining data/asn1c-0.9.28+dfsg/skeletons/constr_SEQUENCE_OF.c Examining data/asn1c-0.9.28+dfsg/skeletons/asn_system.h Examining data/asn1c-0.9.28+dfsg/skeletons/xer_support.h Examining data/asn1c-0.9.28+dfsg/skeletons/PrintableString.h Examining data/asn1c-0.9.28+dfsg/skeletons/ObjectDescriptor.h Examining data/asn1c-0.9.28+dfsg/skeletons/GraphicString.c Examining data/asn1c-0.9.28+dfsg/skeletons/xer_decoder.h Examining data/asn1c-0.9.28+dfsg/skeletons/INTEGER.c Examining data/asn1c-0.9.28+dfsg/skeletons/per_decoder.h Examining data/asn1c-0.9.28+dfsg/skeletons/NULL.c Examining data/asn1c-0.9.28+dfsg/skeletons/GeneralizedTime.h Examining data/asn1c-0.9.28+dfsg/skeletons/RELATIVE-OID.c Examining data/asn1c-0.9.28+dfsg/skeletons/constr_SEQUENCE_OF.h Examining data/asn1c-0.9.28+dfsg/skeletons/constr_SET_OF.h Examining data/asn1c-0.9.28+dfsg/skeletons/VideotexString.c Examining data/asn1c-0.9.28+dfsg/skeletons/asn_SEQUENCE_OF.c Examining data/asn1c-0.9.28+dfsg/skeletons/constr_SET.h Examining data/asn1c-0.9.28+dfsg/skeletons/IA5String.c Examining data/asn1c-0.9.28+dfsg/skeletons/constr_SEQUENCE.c Examining data/asn1c-0.9.28+dfsg/skeletons/VisibleString.h Examining data/asn1c-0.9.28+dfsg/skeletons/ANY.c Examining data/asn1c-0.9.28+dfsg/skeletons/TeletexString.h Examining data/asn1c-0.9.28+dfsg/skeletons/VisibleString.c Examining data/asn1c-0.9.28+dfsg/skeletons/per_opentype.c Examining data/asn1c-0.9.28+dfsg/skeletons/ber_tlv_tag.h Examining data/asn1c-0.9.28+dfsg/skeletons/BIT_STRING.h Examining data/asn1c-0.9.28+dfsg/skeletons/NativeReal.c Examining data/asn1c-0.9.28+dfsg/skeletons/ber_tlv_length.c Examining data/asn1c-0.9.28+dfsg/skeletons/TeletexString.c Examining data/asn1c-0.9.28+dfsg/skeletons/UTF8String.h Examining data/asn1c-0.9.28+dfsg/skeletons/VideotexString.h Examining data/asn1c-0.9.28+dfsg/skeletons/INTEGER.h Examining data/asn1c-0.9.28+dfsg/skeletons/per_support.h Examining data/asn1c-0.9.28+dfsg/skeletons/ObjectDescriptor.c Examining data/asn1c-0.9.28+dfsg/skeletons/ISO646String.h Examining data/asn1c-0.9.28+dfsg/skeletons/UTCTime.c Examining data/asn1c-0.9.28+dfsg/skeletons/ber_tlv_tag.c Examining data/asn1c-0.9.28+dfsg/skeletons/asn_application.h Examining data/asn1c-0.9.28+dfsg/skeletons/constr_CHOICE.h Examining data/asn1c-0.9.28+dfsg/skeletons/NativeEnumerated.c Examining data/asn1c-0.9.28+dfsg/skeletons/OCTET_STRING.h Examining data/asn1c-0.9.28+dfsg/skeletons/constr_SET_OF.c Examining data/asn1c-0.9.28+dfsg/skeletons/converter-sample.c Examining data/asn1c-0.9.28+dfsg/skeletons/T61String.c Examining data/asn1c-0.9.28+dfsg/skeletons/ber_decoder.h Examining data/asn1c-0.9.28+dfsg/skeletons/ENUMERATED.h Examining data/asn1c-0.9.28+dfsg/skeletons/ANY.h Examining data/asn1c-0.9.28+dfsg/skeletons/constr_TYPE.c Examining data/asn1c-0.9.28+dfsg/skeletons/der_encoder.h Examining data/asn1c-0.9.28+dfsg/skeletons/RELATIVE-OID.h Examining data/asn1c-0.9.28+dfsg/skeletons/GeneralString.c Examining data/asn1c-0.9.28+dfsg/skeletons/OBJECT_IDENTIFIER.h Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_internal.h Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.c Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_misc.c Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_fdeps.h Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.h Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_lang.c Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_C.c Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_out.h Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.h Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_constraint.c Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_misc.h Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_out.c Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_lang.h Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_fdeps.c Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1compiler.h Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_C.h Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1compiler.c Examining data/asn1c-0.9.28+dfsg/libasn1compiler/check_compiler.c Examining data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_constraint.h Examining data/asn1c-0.9.28+dfsg/examples/sample.source.LDAP3/config.h Examining data/asn1c-0.9.28+dfsg/examples/sample.source.TAP3/config.h Examining data/asn1c-0.9.28+dfsg/examples/sample.source.MHEG5/config.h Examining data/asn1c-0.9.28+dfsg/examples/sample.source.MEGACO/config.h Examining data/asn1c-0.9.28+dfsg/examples/sample.source.RRC/config.h Examining data/asn1c-0.9.28+dfsg/examples/sample.source.ULP/config.h Examining data/asn1c-0.9.28+dfsg/examples/sample.source.PKIX1/config.h Examining data/asn1c-0.9.28+dfsg/libasn1print/asn1print.h Examining data/asn1c-0.9.28+dfsg/libasn1print/asn1print.c Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_expr2uclass.h Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_module.h Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_class.c Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_oid.h Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_expr.c Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_module.c Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_constr.h Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.h Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_ref.c Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_class.h Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_xports.c Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_value.c Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_param.h Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_ref.h Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_oid.c Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_param.c Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_constr.c Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1parser.h Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_expr.h Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_list.h Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_xports.h Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_expr_str.h Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1parser.c Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_value.h Examining data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_l.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_derefv.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_enum.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_bitstring.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_crange.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_derefv.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_constraint.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_constraint_compat.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_crange.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_compat.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_dereft.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_enum.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_tags.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_cws.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_compat.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_param.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_internal.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_retrieve.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_bitstring.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_value.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_retrieve.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_value.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_misc.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_constr.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_dereft.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_export.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_misc.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_export.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_integer.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_cstring.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_cws.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_param.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_class.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_constr.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_constraint.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_tags.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_class.h Examining data/asn1c-0.9.28+dfsg/libasn1fix/check_fixer.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_integer.c Examining data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_cstring.h Examining data/asn1c-0.9.28+dfsg/asn1c/enber.c Examining data/asn1c-0.9.28+dfsg/asn1c/asn1c.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-131.-gen-PER.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-42.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-30.-fwide-types.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-35.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-33.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-92.-findirect-choice.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-gen-PER.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-19.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-73.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-59.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-133.-gen-PER.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-50.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-25.-fwide-types.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check64-134.-gen-PER.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-132.-gen-PER.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-65.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-03.-fwide-types.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-46.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-48.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-127.-gen-PER.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-fwide-types.-gen-PER.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-72.-fcompound-names.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-44.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-32.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-43.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-24.-fwide-types.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-31.-fwide-types.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.-fwide-types.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-62.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-22.-fwide-types.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.-fwide-types.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-60.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-92.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-39.c Examining data/asn1c-0.9.28+dfsg/asn1c/tests/check-42.cc Examining data/asn1c-0.9.28+dfsg/asn1c/unber.c Examining data/asn1c-0.9.28+dfsg/asn1c/sys-common.h FINAL RESULTS: data/asn1c-0.9.28+dfsg/asn1c/asn1c.c:164:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, "ASN.1 Compiler, v" VERSION "\n" COPYRIGHT); data/asn1c-0.9.28+dfsg/asn1c/enber.c:94:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, data/asn1c-0.9.28+dfsg/asn1c/sys-common.h:70:9: [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 snprintf _snprintf data/asn1c-0.9.28+dfsg/asn1c/sys-common.h:70:18: [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 snprintf _snprintf data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-03.-fwide-types.c:45:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf2, "<Enum2>%s</Enum2>", xer_string); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-fwide-types.-gen-PER.c:326: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((char *)fbuf, sizeof(fbuf), SRCDIR_S "/data-119/%s", fname); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-gen-PER.c:328: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((char *)fbuf, sizeof(fbuf), SRCDIR_S "/data-119/%s", fname); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:251:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(outName, SRCDIR_S "/data-126/%s", fname); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:329: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((char *)fbuf, sizeof(fbuf), SRCDIR_S "/data-126/%s", fname); data/asn1c-0.9.28+dfsg/asn1c/unber.c:95:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, "ASN.1 BER Decoder, v" VERSION "\n" COPYRIGHT); data/asn1c-0.9.28+dfsg/asn1c/unber.c:397:5: [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(fin ? "</" : "<"); data/asn1c-0.9.28+dfsg/asn1c/unber.c:399:5: [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(constr ? ((tlv_len == -1) ? "I" : "C") : "P"); data/asn1c-0.9.28+dfsg/asn1c/unber.c:507:15: [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. if(!vbuf) printf(special_format ? " F>" : ">"); data/asn1c-0.9.28+dfsg/asn1c/unber.c:575:9: [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("%" PRIdASN, collector); data/asn1c-0.9.28+dfsg/asn1c/unber.c:592:21: [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("%" PRIuASN, arcs[i]); data/asn1c-0.9.28+dfsg/asn1c/unber.c:613:21: [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("%" PRIuASN, arcs[i]); data/asn1c-0.9.28+dfsg/examples/sample.source.LDAP3/config.h:6:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, fmt, ##args); \ data/asn1c-0.9.28+dfsg/examples/sample.source.MEGACO/config.h:6:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, fmt, ##args); \ data/asn1c-0.9.28+dfsg/examples/sample.source.MHEG5/config.h:6:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, fmt, ##args); \ data/asn1c-0.9.28+dfsg/examples/sample.source.PKIX1/config.h:6:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, fmt, ##args); \ data/asn1c-0.9.28+dfsg/examples/sample.source.RRC/config.h:6:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, fmt, ##args); \ data/asn1c-0.9.28+dfsg/examples/sample.source.TAP3/config.h:6:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, fmt, ##args); \ data/asn1c-0.9.28+dfsg/examples/sample.source.ULP/config.h:6:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, fmt, ##args); \ data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:193:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(strbuf, *path == '/' ? "/" : "."); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_fdeps.c:80:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s/file-dependencies", datadir); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_internal.h:31:9: [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 snprintf _snprintf data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_internal.h:31:18: [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 snprintf _snprintf data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_internal.h:32:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define vsnprintf _vsnprintf data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_out.c:69:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. ret = vsnprintf(m->buf, m->len, fmt, ap); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.c:17:15: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. int ret = vfprintf(fp, fmt, ap); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.c:129: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(dir_end, fname); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.c:315:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name_buf, "%s.c", expr->Identifier); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.c:329:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name_buf, "%s.h", expr->Identifier); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1compiler.c:175:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix.c:556:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_crange.c:8:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, fmt, ##args); \ data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_crange.c:160:3: [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(buf, sizeof(buf), "%" PRIdASN, edge->value); data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_internal.h:29:9: [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 snprintf _snprintf data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_internal.h:29:18: [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 snprintf _snprintf data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_misc.c:53:9: [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. ret = snprintf(buf, sizeof(buf), "%" PRIdASN, data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_class.c:101: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(nc->content.token, wc->content.token); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_l.c:2023:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, \ data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:1526: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/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:4503:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(p + 1, (yyvsp[(2) - (2)].tv_str)); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:4519:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(p + 2, (yyvsp[(3) - (3)].tv_str)); data/asn1c-0.9.28+dfsg/libasn1print/asn1print.c:36:15: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. int ret = vprintf(fmt, ap); data/asn1c-0.9.28+dfsg/skeletons/INTEGER.c:149:10: [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. ret = snprintf(scr, scrsize, data/asn1c-0.9.28+dfsg/skeletons/NativeInteger.c:224:15: [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. er.encoded = snprintf(scratch, sizeof(scratch), data/asn1c-0.9.28+dfsg/skeletons/NativeInteger.c:309:9: [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. ret = snprintf(scratch, sizeof(scratch), data/asn1c-0.9.28+dfsg/skeletons/REAL.c:121:9: [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. ret = snprintf(buf, buflen, fmt, d); data/asn1c-0.9.28+dfsg/skeletons/asn_internal.h:53:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, fmt, ##args); \ data/asn1c-0.9.28+dfsg/skeletons/asn_system.h:35:10: [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 snprintf _snprintf data/asn1c-0.9.28+dfsg/skeletons/asn_system.h:35:19: [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 snprintf _snprintf data/asn1c-0.9.28+dfsg/skeletons/asn_system.h:36:10: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define vsnprintf _vsnprintf data/asn1c-0.9.28+dfsg/skeletons/asn_system.h:105:55: [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. #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) data/asn1c-0.9.28+dfsg/skeletons/constr_TYPE.c:74:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/asn1c-0.9.28+dfsg/skeletons/constraints.c:52:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vlen = vsnprintf(arg->errbuf, maxlen, fmt, ap); data/asn1c-0.9.28+dfsg/skeletons/converter-sample.c:81:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/asn1c-0.9.28+dfsg/skeletons/converter-sample.c:221:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, data/asn1c-0.9.28+dfsg/asn1c/asn1c.c:72:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while((ch = getopt(ac, av, "EFf:g:hLPp:RS:vW:X")) != -1) switch(ch) { data/asn1c-0.9.28+dfsg/asn1c/enber.c:53:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while((ch = getopt(ac, av, "nhv")) != -1) switch(ch) { data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-fwide-types.-gen-PER.c:119:5: [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. if(getenv("INITIAL_CHUNK_SIZE")) data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-fwide-types.-gen-PER.c:120:16: [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. csize = atoi(getenv("INITIAL_CHUNK_SIZE")); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-fwide-types.-gen-PER.c:350:8: [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. str = getenv("DATA_119_FILE"); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-gen-PER.c:119:5: [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. if(getenv("INITIAL_CHUNK_SIZE")) data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-gen-PER.c:120:16: [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. csize = atoi(getenv("INITIAL_CHUNK_SIZE")); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-gen-PER.c:352:8: [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. str = getenv("DATA_119_FILE"); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:100:5: [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. if(getenv("INITIAL_CHUNK_SIZE")) data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:101:16: [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. csize = atoi(getenv("INITIAL_CHUNK_SIZE")); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:260:31: [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. if((compare && !mustfail) && getenv("REGENERATE")) { data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:353:8: [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. str = getenv("DATA_126_FILE"); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-22.-fwide-types.c:132:14: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. do { loc = random() % size; } while(tmp[loc] >= 70); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-22.-fwide-types.c:133:20: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. do { tmp[loc] ^= random(); } while(tmp[loc] == buf[loc]); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-24.-fwide-types.c:77:14: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. do { loc = random() % size; } while(tmp[loc] >= 70); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-24.-fwide-types.c:78:20: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. do { tmp[loc] ^= random(); } while(tmp[loc] == buf[loc]); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-25.-fwide-types.c:156:14: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. do { loc = random() % size; } while( data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-25.-fwide-types.c:161:30: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. do { tmp[loc] = buf[loc] ^ random(); } while( data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-30.-fwide-types.c:231:14: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. do { loc = random() % size; } while(tmp[loc] >= 70); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-30.-fwide-types.c:232:30: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. do { tmp[loc] = buf[loc] ^ random(); } while( data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-31.-fwide-types.c:193:14: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. do { loc = random() % size; } while(tmp[loc] >= 70); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-31.-fwide-types.c:194:30: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. do { tmp[loc] = buf[loc] ^ random(); } while( data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-62.c:205:8: [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. str = getenv("DATA_62_FILE"); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.-fwide-types.c:112:5: [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. if(getenv("INITIAL_CHUNK_SIZE")) data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.-fwide-types.c:113:16: [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. csize = atoi(getenv("INITIAL_CHUNK_SIZE")); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.-fwide-types.c:315:8: [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. str = getenv("DATA_70_FILE"); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.c:101:5: [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. if(getenv("INITIAL_CHUNK_SIZE")) data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.c:102:16: [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. csize = atoi(getenv("INITIAL_CHUNK_SIZE")); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.c:289:8: [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. str = getenv("DATA_70_FILE"); data/asn1c-0.9.28+dfsg/asn1c/unber.c:64:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while((ch = getopt(ac, av, "1hi:mps:t:v")) != -1) switch(ch) { data/asn1c-0.9.28+dfsg/libasn1fix/check_fixer.c:52:5: [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. if(getenv("ASN1_PARSER_FLAGS")) data/asn1c-0.9.28+dfsg/libasn1fix/check_fixer.c:53:23: [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. parser_flags = atoi(getenv("ASN1_PARSER_FLAGS")); data/asn1c-0.9.28+dfsg/libasn1fix/check_fixer.c:54:5: [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. if(getenv("ASN1_FIXER_FLAGS")) data/asn1c-0.9.28+dfsg/libasn1fix/check_fixer.c:55:22: [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. fixer_flags = atoi(getenv("ASN1_FIXER_FLAGS")); data/asn1c-0.9.28+dfsg/libasn1fix/check_fixer.c:61:38: [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 *asn1_tests_dir = getenv("ASN1_TESTS_DIR"); data/asn1c-0.9.28+dfsg/skeletons/GeneralizedTime.c:117:10: [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. tzold = getenv("TZ"); \ data/asn1c-0.9.28+dfsg/skeletons/converter-sample.c:101:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while((ch = getopt(ac, av, "i:o:1b:cdn:p:hs:" JUNKOPT)) != -1) data/asn1c-0.9.28+dfsg/skeletons/converter-sample.c:813:17: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. if((((double)random() / RAND_MAX) < prob)) data/asn1c-0.9.28+dfsg/skeletons/converter-sample.c:814:12: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. byte = random() & 0xff; data/asn1c-0.9.28+dfsg/skeletons/converter-sample.c:816:29: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define BPROB(b) ((((double)random() / RAND_MAX) < prob) ? b : 0) data/asn1c-0.9.28+dfsg/skeletons/tests/check-GeneralizedTime.c:84:7: [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. tz = getenv("TZ"); data/asn1c-0.9.28+dfsg/skeletons/tests/check-GeneralizedTime.c:192:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *tz = getenv("TZ"); data/asn1c-0.9.28+dfsg/skeletons/tests/check-OIDs.c:452:5: [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. if(getenv("CHECK_SPEED")) { data/asn1c-0.9.28+dfsg/asn1c/enber.c:111:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[8192]; data/asn1c-0.9.28+dfsg/asn1c/enber.c:119:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fname, "r"); data/asn1c-0.9.28+dfsg/asn1c/enber.c:142:13: [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(collector + collector_offset, buf, len + 1); data/asn1c-0.9.28+dfsg/asn1c/enber.c:163:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-03.-fwide-types.c:11: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 buf[4096]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-03.-fwide-types.c:19:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + buf_offset, buffer, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-03.-fwide-types.c:29: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 buf2[128]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-fwide-types.-gen-PER.c:37: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 buf[4096]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-fwide-types.-gen-PER.c:45:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + buf_offset, buffer, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-fwide-types.-gen-PER.c:120:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). csize = atoi(getenv("INITIAL_CHUNK_SIZE")); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-fwide-types.-gen-PER.c:300: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 fbuf[4096]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-fwide-types.-gen-PER.c:327: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((char *)fbuf, "r"); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-gen-PER.c:37: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 buf[4096]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-gen-PER.c:45:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + buf_offset, buffer, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-gen-PER.c:120:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). csize = atoi(getenv("INITIAL_CHUNK_SIZE")); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-gen-PER.c:302: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 fbuf[4096]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-119.-gen-PER.c:329: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((char *)fbuf, "r"); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:27: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 buf[4096]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:35:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + buf_offset, buffer, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:101:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). csize = atoi(getenv("INITIAL_CHUNK_SIZE")); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:244: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 outName[sizeof(SRCDIR_S) + 256]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:245: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 fbuf[1024]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:252:2: [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(outName + strlen(outName) - 3, ".out"); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:261: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). f = fopen(outName, "w"); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:265: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). f = fopen(outName, "r"); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:319: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 fbuf[sizeof(SRCDIR_S) + 4096]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:330: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((char *)fbuf, "r"); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-127.-gen-PER.c:16: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[16]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-132.-gen-PER.c:16: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[2]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-133.-gen-PER.c:16: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[8]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-22.-fwide-types.c:41: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(buf2 + buf2_pos, buffer, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-22.-fwide-types.c:129: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(tmp, buf, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-24.-fwide-types.c:74: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(tmp, buf, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-25.-fwide-types.c:153: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(tmp, buf, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-25.-fwide-types.c:204: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(tbuf1, chunk1, size1); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-25.-fwide-types.c:205: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(tbuf2, chunk2, size2); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-25.-fwide-types.c:206: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(tbuf3, chunk3, size3); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-25.-fwide-types.c:217: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(tbuf2, tbuf1 + rval.consumed, leftover); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-25.-fwide-types.c:218: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(tbuf2 + leftover, chunk2, size2); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-25.-fwide-types.c:229: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(tbuf3, tbuf2 + rval.consumed, leftover); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-25.-fwide-types.c:230: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(tbuf3 + leftover, chunk3, size3); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-30.-fwide-types.c:183: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 xer_buf[128]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-30.-fwide-types.c:190: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(xer_buf + xer_off, buffer, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-30.-fwide-types.c:228: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(tmp, buf, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-31.-fwide-types.c:144: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 xer_buf[512]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-31.-fwide-types.c:151: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(xer_buf + xer_off, buffer, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-31.-fwide-types.c:190: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(tmp, buf, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-32.c:20: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 buf[128]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-35.c:162:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + buf_pos, buffer, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-35.c:232: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(data1, chunk1, size1); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-35.c:233: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(data2, chunk2, size2); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-35.c:234: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(data3, chunk3, size3); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-35.c:245: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(data2, data1 + rval.consumed, leftover); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-35.c:246: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(data2 + leftover, chunk2, size2); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-35.c:257: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(data3, data2 + rval.consumed, leftover); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-35.c:258: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(data3 + leftover, chunk3, size3); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-35.c:273: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 xer_buf[128]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-35.c:280: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(xer_buf + xer_off, buffer, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.-fwide-types.c:178: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(buffer + buf_pos, bufp, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.-fwide-types.c:248: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(data1, chunk1, size1); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.-fwide-types.c:249: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(data2, chunk2, size2); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.-fwide-types.c:250: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(data3, chunk3, size3); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.-fwide-types.c:261: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(data2, data1 + rval.consumed, leftover); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.-fwide-types.c:262: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(data2 + leftover, chunk2, size2); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.-fwide-types.c:273: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(data3, data2 + rval.consumed, leftover); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.-fwide-types.c:274: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(data3 + leftover, chunk3, size3); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.c:85:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + buf_pos, buffer, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.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(buf_1, chunk1, size1); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.c:156: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(buf_2, chunk2, size2); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.c:157: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(buf_3, chunk3, size3); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.c:168:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf_2, buf_1 + rval.consumed, leftover); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.c:169:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf_2 + leftover, chunk2, size2); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.c:180:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf_3, buf_2 + rval.consumed, leftover); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-41.c:181:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf_3 + leftover, chunk3, size3); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-42.c:84:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + buf_pos, buffer, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-48.c:11: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 buf[4096]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-48.c:19:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + buf_offset, buffer, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-60.c:12: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 buf[4096]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-60.c:20:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + buf_offset, buffer, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-62.c:28: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 buf[4096]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-62.c:36:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + buf_offset, buffer, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-62.c:153: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 prevdir[256]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-62.c:154: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 fbuf[4096]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-62.c:180: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(fname, "r"); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.-fwide-types.c:36: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 buf[4096]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.-fwide-types.c:44:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + buf_offset, buffer, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.-fwide-types.c:113:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). csize = atoi(getenv("INITIAL_CHUNK_SIZE")); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.-fwide-types.c:263: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 prevdir[256]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.-fwide-types.c:264: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 fbuf[4096]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.-fwide-types.c:292: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(fname, "r"); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.c:34: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 buf[4096]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.c:42:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + buf_offset, buffer, size); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.c:102:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). csize = atoi(getenv("INITIAL_CHUNK_SIZE")); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.c:239: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 prevdir[256]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.c:240: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 fbuf[4096]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-70.c:266: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(fname, "r"); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check64-134.-gen-PER.c:43: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[20]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check64-134.-gen-PER.c:78: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[16]; data/asn1c-0.9.28+dfsg/asn1c/unber.c:54: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 indent_bytes[16] = " "; /* -i controls that */ data/asn1c-0.9.28+dfsg/asn1c/unber.c:69:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). i = atoi(optarg); data/asn1c-0.9.28+dfsg/asn1c/unber.c:85:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). skip_bytes = atoi(optarg); data/asn1c-0.9.28+dfsg/asn1c/unber.c:185:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fname, "rb"); data/asn1c-0.9.28+dfsg/asn1c/unber.c:229: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 tagbuf[32]; data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:27:5: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). int mkstemp(char *template) { data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:30:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return open(tmpFN, O_CREAT | O_EXCL | O_WRONLY, DEFFILEMODE); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:38:8: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). #undef mkstemp data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:39:9: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). #define mkstemp(foo) mkstemps(foo, 0) data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:67:8: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). fd = mkstemp(fname); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:76:8: [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). fd = open(fname, O_CREAT | O_EXCL | O_WRONLY, DEFFILEMODE); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:78:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(fname, O_WRONLY, DEFFILEMODE); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:136: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 strbuf[MAXPATHLEN]; data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:161: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(strbuf, name, pend - name + 1); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:170: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 strbuf[MAXPATHLEN]; data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:207: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(strbuf, path, last - path); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_fdeps.c:34: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(p, start, end - start); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_fdeps.c:68: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 buf[4096]; data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_fdeps.c:83:6: [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). f = fopen(buf, "r"); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_internal.h:29:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). #define open _open data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_misc.c:62: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. static char buf[32]; data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.c:113:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[8129]; data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.c:118:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, datadir, dlen); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.c:375: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 buf[2][4096]; data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.c:389: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). fp1 = fopen(fname1, "r"); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.c:391: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). fp2 = fopen(fname2, "r"); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.c:414: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[4096]; data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.c:423: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). fpsrc = fopen(src, "r"); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.c:570:2: [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(def, " -DPDU="); data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_constr.c:426: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 tagbuf[2][TAG2STRING_BUFFER_SIZE]; data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_crange.c:154: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 buf[128]; data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_crange.c:157:16: [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. case ARE_MIN: strcpy(buf, "MIN"); break; data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_crange.c:158:16: [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. case ARE_MAX: strcpy(buf, "MAX"); break; data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_cws.c:184: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(p, buf, bend - buf); data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_misc.c:20: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 buf[128]; data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_misc.c:50: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(buf + sizeof(buf) - 4, "...", 4); data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_misc.c:56: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(buf + sizeof(buf) - 4, "...", 4); data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_misc.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(buf + sizeof(buf) - 4, "...", 4); data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_misc.c:76: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(buf + sizeof(buf) - 4, "...", 4); data/asn1c-0.9.28+dfsg/libasn1fix/check_fixer.c:53:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). parser_flags = atoi(getenv("ASN1_PARSER_FLAGS")); data/asn1c-0.9.28+dfsg/libasn1fix/check_fixer.c:55:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). fixer_flags = atoi(getenv("ASN1_FIXER_FLAGS")); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_expr.c:274: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 buf_stat[TAG2STRING_BUFFER_SIZE]; data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_expr.c:292:21: [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. case TC_UNIVERSAL: strcat(buf, "UNIVERSAL "); break; data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_expr.c:293:19: [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. case TC_PRIVATE: strcat(buf, "PRIVATE "); break; data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_expr.c:294:23: [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. case TC_APPLICATION: strcat(buf, "APPLICATION "); break; data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_expr.c:304:20: [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. case TM_IMPLICIT: strcat(buf, " IMPLICIT"); break; data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_expr.c:305:20: [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. case TM_EXPLICIT: strcat(buf, " EXPLICIT"); break; data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_l.c:2067:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if(prev_text) memcpy(p, prev_text, prev_len); \ data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_l.c:2068: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 + prev_len, text, tlen); \ data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_value.c:67: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(p, bits, size); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_value.c:68:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ((char *)p)[size] = '\0'; /* JIC */ data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_value.c:95: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(p, buffer, size); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_value.c:96:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ((char *)p)[size] = '\0'; /* JIC */ data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:1823:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:1840:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char yyformat[sizeof yyunexpected data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:2008: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/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:3782: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((yyval.tv_opaque).buf + 1, (yyvsp[(1) - (1)].tv_opaque).buf, (yyvsp[(1) - (1)].tv_opaque).len); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:3794: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 , (yyvsp[(1) - (2)].tv_opaque).buf, (yyvsp[(1) - (2)].tv_opaque).len); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:3795: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 + (yyvsp[(1) - (2)].tv_opaque).len, (yyvsp[(2) - (2)].tv_opaque).buf, (yyvsp[(2) - (2)].tv_opaque).len); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:4541: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((yyval.tv_str), (yyvsp[(1) - (3)].tv_str), l1); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:4543: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((yyval.tv_str) + l1 + 1, (yyvsp[(3) - (3)].tv_str), l3); data/asn1c-0.9.28+dfsg/libasn1parser/asn1parser.c:85: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(filename, "r"); data/asn1c-0.9.28+dfsg/libasn1print/asn1print.c:274:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hextable[16] = "0123456789ABCDEF"; data/asn1c-0.9.28+dfsg/skeletons/ANY.c:152: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(arg->buffer + arg->offset, buffer, size); data/asn1c-0.9.28+dfsg/skeletons/BIT_STRING.c:70: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 *_bit_pattern[16] = { data/asn1c-0.9.28+dfsg/skeletons/BIT_STRING.c:80: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 scratch[128]; data/asn1c-0.9.28+dfsg/skeletons/BIT_STRING.c:108: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 + 0, _bit_pattern[v >> 4], 4); data/asn1c-0.9.28+dfsg/skeletons/BIT_STRING.c:109: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 + 4, _bit_pattern[v & 0x0f], 4); data/asn1c-0.9.28+dfsg/skeletons/BIT_STRING.c:144: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 scratch[64]; data/asn1c-0.9.28+dfsg/skeletons/BMPString.c:56: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 scratch[128]; /* Scratchpad buffer */ data/asn1c-0.9.28+dfsg/skeletons/GeneralizedTime.c:32:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return memcpy(result, tm, sizeof(struct tm)); data/asn1c-0.9.28+dfsg/skeletons/GeneralizedTime.c:39:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return memcpy(result, tm, sizeof(struct tm)); data/asn1c-0.9.28+dfsg/skeletons/GeneralizedTime.c:114: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 tzoldbuf[64]; \ data/asn1c-0.9.28+dfsg/skeletons/GeneralizedTime.c:121:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. tzold = memcpy(tzoldbuf, tzold, tzlen + 1); \ data/asn1c-0.9.28+dfsg/skeletons/GeneralizedTime.c:125:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if(tzold) memcpy(tzold, dupptr, tzlen + 1); \ data/asn1c-0.9.28+dfsg/skeletons/GeneralizedTime.c:292:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/asn1c-0.9.28+dfsg/skeletons/INTEGER.c:111: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 scratch[32]; /* Enough for 64-bit integer */ data/asn1c-0.9.28+dfsg/skeletons/NativeInteger.c:215: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 scratch[32]; /* Enough for 64-bit int */ data/asn1c-0.9.28+dfsg/skeletons/NativeInteger.c:302: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 scratch[32]; /* Enough for 64-bit int */ data/asn1c-0.9.28+dfsg/skeletons/NativeReal.c:124: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(tmp.buf, buf_ptr, length); data/asn1c-0.9.28+dfsg/skeletons/NativeReal.c:135:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if(tmp.buf) memcpy(tmp.buf, buf_ptr, length); data/asn1c-0.9.28+dfsg/skeletons/OBJECT_IDENTIFIER.c:186: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 scratch[64]; /* Conservative estimate */ data/asn1c-0.9.28+dfsg/skeletons/OBJECT_IDENTIFIER.c:511:27: [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. arc0 = ((const unsigned char *)arcs)[0]; data/asn1c-0.9.28+dfsg/skeletons/OBJECT_IDENTIFIER.c:512:27: [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. arc1 = ((const unsigned char *)arcs)[1]; data/asn1c-0.9.28+dfsg/skeletons/OCTET_STRING.c:101: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(st->buf + st->size, bufptr, _bs); \ data/asn1c-0.9.28+dfsg/skeletons/OCTET_STRING.c:355: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 buf[2][32]; data/asn1c-0.9.28+dfsg/skeletons/OCTET_STRING.c:586: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 scratch[16 * 3 + 4]; data/asn1c-0.9.28+dfsg/skeletons/OCTET_STRING.c:1660: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 scratch[16 * 3 + 4]; data/asn1c-0.9.28+dfsg/skeletons/OCTET_STRING.c:1783:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, str, len); data/asn1c-0.9.28+dfsg/skeletons/REAL.c:83: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 local_buf[64]; data/asn1c-0.9.28+dfsg/skeletons/REAL.c:355: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(b, chunk_buf, chunk_size); data/asn1c-0.9.28+dfsg/skeletons/REAL.c:597: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 assertion_buffer1[9 - sizeof(dbl_value)] GCC_NOTUSED; data/asn1c-0.9.28+dfsg/skeletons/REAL.c:598: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 assertion_buffer2[sizeof(dbl_value) - 7] GCC_NOTUSED; data/asn1c-0.9.28+dfsg/skeletons/REAL.c:740: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(ptr, dscr, buflen); data/asn1c-0.9.28+dfsg/skeletons/REAL.c:747: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(ptr, buf, buflen); data/asn1c-0.9.28+dfsg/skeletons/UTCTime.c:120:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/asn1c-0.9.28+dfsg/skeletons/UTCTime.c:141: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 buf[24]; /* "AAMMJJhhmmss+hhmm" + cushion */ data/asn1c-0.9.28+dfsg/skeletons/UTCTime.c:152: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(gt.buf + 2, st->buf, st->size); data/asn1c-0.9.28+dfsg/skeletons/UniversalString.c:54: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 scratch[128]; /* Scratchpad buffer */ data/asn1c-0.9.28+dfsg/skeletons/asn_codecs_prim.c:67: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(st->buf, buf_ptr, length); data/asn1c-0.9.28+dfsg/skeletons/asn_codecs_prim.c:159:31: [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. assert(chunk_size && ((const char *)chunk_buf)[0] == 0x3c); data/asn1c-0.9.28+dfsg/skeletons/ber_tlv_tag.c:63: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 buf[sizeof("[APPLICATION ]") + 32]; data/asn1c-0.9.28+dfsg/skeletons/ber_tlv_tag.c:95: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 buf[sizeof("[APPLICATION ]") + 32]; data/asn1c-0.9.28+dfsg/skeletons/constr_SEQUENCE.c:839:19: [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. size>0?((const char *)buf_ptr)[0]:'.', data/asn1c-0.9.28+dfsg/skeletons/constr_SEQUENCE.c:840:19: [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. size>1?((const char *)buf_ptr)[1]:'.', data/asn1c-0.9.28+dfsg/skeletons/constr_SEQUENCE.c:841:19: [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. size>2?((const char *)buf_ptr)[2]:'.', data/asn1c-0.9.28+dfsg/skeletons/constr_SEQUENCE.c:842:19: [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. size>3?((const char *)buf_ptr)[3]:'.', data/asn1c-0.9.28+dfsg/skeletons/constr_SEQUENCE.c:843:19: [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. size>4?((const char *)buf_ptr)[4]:'.', data/asn1c-0.9.28+dfsg/skeletons/constr_SEQUENCE.c:844:19: [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. size>5?((const char *)buf_ptr)[5]:'.'); data/asn1c-0.9.28+dfsg/skeletons/constr_SET_OF.c:245:28: [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. if(LEFT > 0 && ((const char *)ptr)[0] != 0) { data/asn1c-0.9.28+dfsg/skeletons/constr_SET_OF.c:252:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if(((const char *)ptr)[0] == 0 data/asn1c-0.9.28+dfsg/skeletons/constr_SET_OF.c:253:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. && ((const char *)ptr)[1] == 0) { data/asn1c-0.9.28+dfsg/skeletons/constr_SET_OF.c:282: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(el_buf->buf + el_buf->length, buffer, size); data/asn1c-0.9.28+dfsg/skeletons/constr_SET_OF.c:631: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((char *)t->buffer + t->offset, buffer, size); data/asn1c-0.9.28+dfsg/skeletons/constraints.c:68: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(arg->errbuf, "<broken vsnprintf>", arg->errlen); data/asn1c-0.9.28+dfsg/skeletons/converter-sample.c:125:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). suggested_bufsize = atoi(optarg); data/asn1c-0.9.28+dfsg/skeletons/converter-sample.c:141:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). number_of_iterations = atoi(optarg); data/asn1c-0.9.28+dfsg/skeletons/converter-sample.c:169:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). opt_stack = atoi(optarg); data/asn1c-0.9.28+dfsg/skeletons/converter-sample.c:277: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 errbuf[128]; data/asn1c-0.9.28+dfsg/skeletons/converter-sample.c:520: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, data/asn1c-0.9.28+dfsg/skeletons/converter-sample.c:532: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(DynamicBuffer.data data/asn1c-0.9.28+dfsg/skeletons/converter-sample.c:791:5: [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). : fopen(av[idx], "rb"); data/asn1c-0.9.28+dfsg/skeletons/der_encoder.c:43: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(arg->buffer, buffer, size); data/asn1c-0.9.28+dfsg/skeletons/per_encoder.c:25: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(arg->buffer, buffer, size); data/asn1c-0.9.28+dfsg/skeletons/per_encoder.c:63: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(((char *)arg->buffer) + arg->length, buffer, size); data/asn1c-0.9.28+dfsg/skeletons/per_support.c:12: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 buf[2][32]; data/asn1c-0.9.28+dfsg/skeletons/tests/check-INTEGER.c:10: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(shared_scratch_start, buf, size); data/asn1c-0.9.28+dfsg/skeletons/tests/check-INTEGER.c:18: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 scratch[128]; data/asn1c-0.9.28+dfsg/skeletons/tests/check-INTEGER.c:19: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 verify[32]; data/asn1c-0.9.28+dfsg/skeletons/tests/check-INTEGER.c:79: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 scratch[128]; data/asn1c-0.9.28+dfsg/skeletons/tests/check-INTEGER.c:80: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 verify[32]; data/asn1c-0.9.28+dfsg/skeletons/tests/check-OCTET_STRING.c:51: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 buf[1024]; data/asn1c-0.9.28+dfsg/skeletons/tests/check-OCTET_STRING.c:57:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + *off, buffer, size); data/asn1c-0.9.28+dfsg/skeletons/tests/check-PER.c:331: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(out.buffer, buf, buf_size); data/asn1c-0.9.28+dfsg/skeletons/tests/check-REAL.c:13: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 reconstructed[2][512]; data/asn1c-0.9.28+dfsg/skeletons/tests/check-REAL.c:24:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + *len, buffer, size); data/asn1c-0.9.28+dfsg/skeletons/tests/check-length.c:26:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + buf_off, buffer, size); data/asn1c-0.9.28+dfsg/asn1c/asn1c.c:241:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(p) + sizeof("/../skeletons"); data/asn1c-0.9.28+dfsg/asn1c/asn1c.c:365: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). target_dir_len = strlen(skeletons_dir) + sizeof("/standard-modules") - 1; data/asn1c-0.9.28+dfsg/asn1c/asn1c.c:394: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). len = strlen(filename); data/asn1c-0.9.28+dfsg/asn1c/enber.c:130: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 len = strlen(buf); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-03.-fwide-types.c:34: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). xer_string, strlen(xer_string)); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-03.-fwide-types.c:36:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert(rv.consumed == strlen(xer_string)); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:252:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strcpy(outName + strlen(outName) - 3, ".out"); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:256: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). lastChar = outName[strlen(outName)-5]; data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-126.-gen-PER.c:306:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(fname[strlen(fname) - 4] == 'X') data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-30.-fwide-types.c:200:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int xer_sample_len = strlen(xer_sample); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-31.-fwide-types.c:161:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int xer_sample_len = strlen(xer_sample); data/asn1c-0.9.28+dfsg/asn1c/tests/check-src/check-35.c:290:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t xer_sample_len = strlen(xer_sample); data/asn1c-0.9.28+dfsg/asn1c/unber.c:198:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(fgetc(fp) == -1) { data/asn1c-0.9.28+dfsg/asn1c/unber.c:255:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = fgetc(fp); data/asn1c-0.9.28+dfsg/asn1c/unber.c:514:18: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int ch = fgetc(fp); data/asn1c-0.9.28+dfsg/asn1c/unber.c:682: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). dsize = strlen(datastring) + 1; data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_C.c:185:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (long)strlen(v2e[eidx].name), v2e[eidx].name, data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:57:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(name) + strlen(ext) + sizeof(".XXXXXX"); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:57:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(name) + strlen(ext) + sizeof(".XXXXXX"); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:140:16: [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). pend = path + strlen(path); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:142:3: [1] (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 character. strcpy(strbuf, "."); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:150:3: [1] (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 character. strcpy(strbuf, "/"); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_compat.c:198:3: [1] (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 character. strcpy(strbuf, "/"); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_fdeps.c:76:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(!datadir || strlen(datadir) > sizeof(buf) / 2) { data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_misc.c:60: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). size = strlen(expr->Identifier); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_misc.c:73: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). size += 1 + strlen(str); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.c:115:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t dlen = strlen(datadir); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.c:128:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert(strlen(fname) < (sizeof(buf) / 2)); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.c:313: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). name_buf = alloca(strlen(expr->Identifier) + 3); data/asn1c-0.9.28+dfsg/libasn1compiler/asn1c_save.c:568: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). def = malloc(strlen(pduType[0].typename) + 20); data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_cws.c:89:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int token_len = strlen(chunk->content.token); data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_cws.c:224: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). idLength = strlen(expr->Identifier); data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_misc.c:144: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). reflen += strlen(ref->components[i].name); data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_misc.c:176:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ENSURE(strlen(cid) + sizeof(": ") + strlen(val)); data/asn1c-0.9.28+dfsg/libasn1fix/asn1fix_misc.c:176: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). ENSURE(strlen(cid) + sizeof(": ") + strlen(val)); data/asn1c-0.9.28+dfsg/libasn1fix/check_fixer.c:92:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(filename); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_class.c:32:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int fieldIdLen = strlen(field->Identifier); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_class.c:100:31: [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). nc->content.token = malloc(strlen(wc->content.token)+1); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_expr.c:287:2: [1] (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 character. strcpy(buf, "["); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_expr.c:298:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf += snprintf(buf + strlen(buf), end - buf, data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_l.c:2242:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (c = getc( asn1p_in )) != EOF && c != '\n'; ++n ) \ data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_l.c:4298:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return asn1p__scan_bytes(yystr,strlen(yystr) ); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:1704: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/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:4355:76: [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). (yyval.a_constr)->value = asn1p_value_frombuf((yyvsp[(1) - (3)].tv_str), strlen((yyvsp[(1) - (3)].tv_str)), 0); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:4500: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). char *p = malloc(strlen((yyvsp[(2) - (2)].tv_str)) + 2); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:4515: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). char *p = malloc(strlen((yyvsp[(3) - (3)].tv_str)) + 3); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:4538: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). int l1 = strlen((yyvsp[(1) - (3)].tv_str)); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:4539: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). int l3 = strlen((yyvsp[(3) - (3)].tv_str)); data/asn1c-0.9.28+dfsg/libasn1parser/asn1p_y.c:5046:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = strlen(str); data/asn1c-0.9.28+dfsg/libasn1parser/asn1parser.c:39: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). size = (int)strlen(buffer); data/asn1c-0.9.28+dfsg/libasn1print/asn1print.c:90:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). asn1print_oid(strlen(mod->ModuleName), mod->module_oid, flags); data/asn1c-0.9.28+dfsg/libasn1print/asn1print.c:149:14: [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(accum + strlen(arcname ? arcname : "") > 72) { data/asn1c-0.9.28+dfsg/skeletons/GeneralizedTime.c:119:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t tzlen = strlen(tzold); \ data/asn1c-0.9.28+dfsg/skeletons/OBJECT_IDENTIFIER.c:665: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). oid_txt_length = strlen(oid_text); data/asn1c-0.9.28+dfsg/skeletons/OCTET_STRING.c:1776:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/asn1c-0.9.28+dfsg/skeletons/constr_CHOICE.c:798:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned int mlen = strlen(mname); data/asn1c-0.9.28+dfsg/skeletons/constr_CHOICE.c:1022:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(cb(elm->name, strlen(elm->name), app_key) < 0 data/asn1c-0.9.28+dfsg/skeletons/constr_SEQUENCE.c:870:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned int mlen = strlen(mname); data/asn1c-0.9.28+dfsg/skeletons/constr_SEQUENCE.c:912:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(cb(td->name, strlen(td->name), app_key) < 0 data/asn1c-0.9.28+dfsg/skeletons/constr_SEQUENCE.c:935: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(cb(elm->name, strlen(elm->name), app_key) < 0 data/asn1c-0.9.28+dfsg/skeletons/constr_SEQUENCE_OF.c:100:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned int mlen = mname ? strlen(mname) : 0; data/asn1c-0.9.28+dfsg/skeletons/constr_SEQUENCE_OF.c:123:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(name); data/asn1c-0.9.28+dfsg/skeletons/constr_SET.c:830: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). mlen = strlen(elm->name); data/asn1c-0.9.28+dfsg/skeletons/constr_SET.c:874:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(cb(td->name, strlen(td->name), app_key) < 0 data/asn1c-0.9.28+dfsg/skeletons/constr_SET.c:896: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(cb(elm->name, strlen(elm->name), app_key) < 0 data/asn1c-0.9.28+dfsg/skeletons/constr_SET_OF.c:663:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t mlen = mname ? strlen(mname) : 0; data/asn1c-0.9.28+dfsg/skeletons/constr_SET_OF.c:710:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(name); data/asn1c-0.9.28+dfsg/skeletons/constr_SET_OF.c:769:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(cb(td->name, strlen(td->name), app_key) < 0 data/asn1c-0.9.28+dfsg/skeletons/tests/check-GeneralizedTime.c:16: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). gt.size = strlen(time_str); data/asn1c-0.9.28+dfsg/skeletons/tests/check-GeneralizedTime.c:57: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). assert(gt->size == (int)strlen((char *)gt->buf)); data/asn1c-0.9.28+dfsg/skeletons/tests/check-GeneralizedTime.c:75: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). gt.size = strlen(time_str); data/asn1c-0.9.28+dfsg/skeletons/tests/check-INTEGER.c:154: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). xmldata, strlen(xmldata)); data/asn1c-0.9.28+dfsg/skeletons/tests/check-OCTET_STRING.c:13: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). int xmllen = strlen(xmlbuf); data/asn1c-0.9.28+dfsg/skeletons/tests/check-OCTET_STRING.c:14:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int verlen = verify ? strlen(verify) : 0; data/asn1c-0.9.28+dfsg/skeletons/tests/check-OIDs.c:251:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). xer, strlen(xer)); data/asn1c-0.9.28+dfsg/skeletons/tests/check-UTCTime.c:15: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). gt.size = strlen(time_str); data/asn1c-0.9.28+dfsg/skeletons/tests/check-UTF8String.c:12:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(buflen < 0) buflen = strlen(buf); data/asn1c-0.9.28+dfsg/skeletons/tests/check-XER.c:11: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). xct = xer_check_tag(tag, strlen(tag), name); data/asn1c-0.9.28+dfsg/skeletons/tests/check-XER.c:19:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int xerbuf_len = strlen(xerbuf); data/asn1c-0.9.28+dfsg/skeletons/xer_encoder.c:24:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). mlen = strlen(mname); ANALYSIS SUMMARY: Hits = 417 Lines analyzed = 56786 in approximately 1.61 seconds (35220 lines/second) Physical Source Lines of Code (SLOC) = 42175 Hits@level = [0] 625 [1] 80 [2] 235 [3] 43 [4] 59 [5] 0 Hits@level+ = [0+] 1042 [1+] 417 [2+] 337 [3+] 102 [4+] 59 [5+] 0 Hits/KSLOC@level+ = [0+] 24.7066 [1+] 9.88737 [2+] 7.99052 [3+] 2.41849 [4+] 1.39893 [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.