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/osmo-libasn1c-0.9.32/include/asn1c/ANY.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/BIT_STRING.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/BMPString.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/BOOLEAN.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/ENUMERATED.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/GeneralString.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/GeneralizedTime.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/GraphicString.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/IA5String.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/INTEGER.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/ISO646String.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/NULL.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/NativeEnumerated.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/NativeInteger.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/NativeReal.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/NumericString.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/OBJECT_IDENTIFIER.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/OCTET_STRING.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/ObjectDescriptor.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/PrintableString.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/REAL.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/RELATIVE-OID.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/T61String.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/TeletexString.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/UTCTime.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/UTF8String.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/UniversalString.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/VideotexString.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/VisibleString.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/asn1helpers.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/asn_SEQUENCE_OF.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/asn_SET_OF.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/asn_application.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/asn_codecs.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/asn_codecs_prim.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/asn_internal.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/asn_system.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/ber_decoder.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/ber_tlv_length.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/ber_tlv_tag.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/constr_CHOICE.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/constr_SEQUENCE.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/constr_SEQUENCE_OF.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/constr_SET.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/constr_SET_OF.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/constr_TYPE.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/constraints.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/der_encoder.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/per_decoder.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/per_encoder.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/per_opentype.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/per_support.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/xer_decoder.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/xer_encoder.h Examining data/osmo-libasn1c-0.9.32/include/asn1c/xer_support.h Examining data/osmo-libasn1c-0.9.32/src/ANY.c Examining data/osmo-libasn1c-0.9.32/src/BIT_STRING.c Examining data/osmo-libasn1c-0.9.32/src/BMPString.c Examining data/osmo-libasn1c-0.9.32/src/BOOLEAN.c Examining data/osmo-libasn1c-0.9.32/src/ENUMERATED.c Examining data/osmo-libasn1c-0.9.32/src/GeneralString.c Examining data/osmo-libasn1c-0.9.32/src/GeneralizedTime.c Examining data/osmo-libasn1c-0.9.32/src/GraphicString.c Examining data/osmo-libasn1c-0.9.32/src/IA5String.c Examining data/osmo-libasn1c-0.9.32/src/INTEGER.c Examining data/osmo-libasn1c-0.9.32/src/ISO646String.c Examining data/osmo-libasn1c-0.9.32/src/NULL.c Examining data/osmo-libasn1c-0.9.32/src/NativeEnumerated.c Examining data/osmo-libasn1c-0.9.32/src/NativeInteger.c Examining data/osmo-libasn1c-0.9.32/src/NativeReal.c Examining data/osmo-libasn1c-0.9.32/src/NumericString.c Examining data/osmo-libasn1c-0.9.32/src/OBJECT_IDENTIFIER.c Examining data/osmo-libasn1c-0.9.32/src/OCTET_STRING.c Examining data/osmo-libasn1c-0.9.32/src/ObjectDescriptor.c Examining data/osmo-libasn1c-0.9.32/src/PrintableString.c Examining data/osmo-libasn1c-0.9.32/src/REAL.c Examining data/osmo-libasn1c-0.9.32/src/RELATIVE-OID.c Examining data/osmo-libasn1c-0.9.32/src/T61String.c Examining data/osmo-libasn1c-0.9.32/src/TeletexString.c Examining data/osmo-libasn1c-0.9.32/src/UTCTime.c Examining data/osmo-libasn1c-0.9.32/src/UTF8String.c Examining data/osmo-libasn1c-0.9.32/src/UniversalString.c Examining data/osmo-libasn1c-0.9.32/src/VideotexString.c Examining data/osmo-libasn1c-0.9.32/src/VisibleString.c Examining data/osmo-libasn1c-0.9.32/src/asn1helpers.c Examining data/osmo-libasn1c-0.9.32/src/asn_SEQUENCE_OF.c Examining data/osmo-libasn1c-0.9.32/src/asn_SET_OF.c Examining data/osmo-libasn1c-0.9.32/src/asn_codecs_prim.c Examining data/osmo-libasn1c-0.9.32/src/ber_decoder.c Examining data/osmo-libasn1c-0.9.32/src/ber_tlv_length.c Examining data/osmo-libasn1c-0.9.32/src/ber_tlv_tag.c Examining data/osmo-libasn1c-0.9.32/src/constr_CHOICE.c Examining data/osmo-libasn1c-0.9.32/src/constr_SEQUENCE.c Examining data/osmo-libasn1c-0.9.32/src/constr_SEQUENCE_OF.c Examining data/osmo-libasn1c-0.9.32/src/constr_SET.c Examining data/osmo-libasn1c-0.9.32/src/constr_SET_OF.c Examining data/osmo-libasn1c-0.9.32/src/constr_TYPE.c Examining data/osmo-libasn1c-0.9.32/src/constraints.c Examining data/osmo-libasn1c-0.9.32/src/der_encoder.c Examining data/osmo-libasn1c-0.9.32/src/per_decoder.c Examining data/osmo-libasn1c-0.9.32/src/per_encoder.c Examining data/osmo-libasn1c-0.9.32/src/per_opentype.c Examining data/osmo-libasn1c-0.9.32/src/per_support.c Examining data/osmo-libasn1c-0.9.32/src/xer_decoder.c Examining data/osmo-libasn1c-0.9.32/src/xer_encoder.c Examining data/osmo-libasn1c-0.9.32/src/xer_support.c FINAL RESULTS: data/osmo-libasn1c-0.9.32/include/asn1c/asn_internal.h:60: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/osmo-libasn1c-0.9.32/include/asn1c/asn_system.h:25: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/osmo-libasn1c-0.9.32/include/asn1c/asn_system.h:25: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/osmo-libasn1c-0.9.32/include/asn1c/asn_system.h:26: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/osmo-libasn1c-0.9.32/include/asn1c/asn_system.h:95: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/osmo-libasn1c-0.9.32/src/INTEGER.c:153: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/osmo-libasn1c-0.9.32/src/NativeEnumerated.c:351: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(scratch, sizeof(scratch), data/osmo-libasn1c-0.9.32/src/NativeInteger.c:226: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/osmo-libasn1c-0.9.32/src/NativeInteger.c:373: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/osmo-libasn1c-0.9.32/src/REAL.c:123: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/osmo-libasn1c-0.9.32/src/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/osmo-libasn1c-0.9.32/src/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/osmo-libasn1c-0.9.32/src/GeneralizedTime.c:114: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/osmo-libasn1c-0.9.32/src/ANY.c:237: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/osmo-libasn1c-0.9.32/src/BIT_STRING.c:72: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/osmo-libasn1c-0.9.32/src/BIT_STRING.c:82: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/osmo-libasn1c-0.9.32/src/BIT_STRING.c:110: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/osmo-libasn1c-0.9.32/src/BIT_STRING.c:111: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/osmo-libasn1c-0.9.32/src/BIT_STRING.c:146: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/osmo-libasn1c-0.9.32/src/BMPString.c:58: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/osmo-libasn1c-0.9.32/src/GeneralizedTime.c:29: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/osmo-libasn1c-0.9.32/src/GeneralizedTime.c:36: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/osmo-libasn1c-0.9.32/src/GeneralizedTime.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 tzoldbuf[64]; \ data/osmo-libasn1c-0.9.32/src/GeneralizedTime.c:118: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/osmo-libasn1c-0.9.32/src/GeneralizedTime.c:122: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/osmo-libasn1c-0.9.32/src/GeneralizedTime.c:291: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/osmo-libasn1c-0.9.32/src/INTEGER.c:115: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/osmo-libasn1c-0.9.32/src/NativeEnumerated.c:339: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[256]; data/osmo-libasn1c-0.9.32/src/NativeInteger.c:217: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/osmo-libasn1c-0.9.32/src/NativeInteger.c:366: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/osmo-libasn1c-0.9.32/src/NativeReal.c:126: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/osmo-libasn1c-0.9.32/src/NativeReal.c:137: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/osmo-libasn1c-0.9.32/src/OBJECT_IDENTIFIER.c:188: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/osmo-libasn1c-0.9.32/src/OBJECT_IDENTIFIER.c:513: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/osmo-libasn1c-0.9.32/src/OBJECT_IDENTIFIER.c:514: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/osmo-libasn1c-0.9.32/src/OCTET_STRING.c:103: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/osmo-libasn1c-0.9.32/src/OCTET_STRING.c:357: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/osmo-libasn1c-0.9.32/src/OCTET_STRING.c:588: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/osmo-libasn1c-0.9.32/src/OCTET_STRING.c:2017: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/osmo-libasn1c-0.9.32/src/OCTET_STRING.c:2138: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/osmo-libasn1c-0.9.32/src/REAL.c:85:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char local_buf[64]; data/osmo-libasn1c-0.9.32/src/REAL.c:334: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/osmo-libasn1c-0.9.32/src/REAL.c:591: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/osmo-libasn1c-0.9.32/src/REAL.c:592: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/osmo-libasn1c-0.9.32/src/REAL.c:734: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/osmo-libasn1c-0.9.32/src/REAL.c:741: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/osmo-libasn1c-0.9.32/src/UTCTime.c:122: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/osmo-libasn1c-0.9.32/src/UTCTime.c:143: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/osmo-libasn1c-0.9.32/src/UTCTime.c:154: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/osmo-libasn1c-0.9.32/src/UniversalString.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/osmo-libasn1c-0.9.32/src/asn1helpers.c:74: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/osmo-libasn1c-0.9.32/src/asn_codecs_prim.c:71: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/osmo-libasn1c-0.9.32/src/asn_codecs_prim.c:163: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/osmo-libasn1c-0.9.32/src/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/osmo-libasn1c-0.9.32/src/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/osmo-libasn1c-0.9.32/src/constr_SEQUENCE.c:838: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/osmo-libasn1c-0.9.32/src/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>1?((const char *)buf_ptr)[1]:'.', data/osmo-libasn1c-0.9.32/src/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>2?((const char *)buf_ptr)[2]:'.', data/osmo-libasn1c-0.9.32/src/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>3?((const char *)buf_ptr)[3]:'.', data/osmo-libasn1c-0.9.32/src/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>4?((const char *)buf_ptr)[4]:'.', data/osmo-libasn1c-0.9.32/src/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>5?((const char *)buf_ptr)[5]:'.'); data/osmo-libasn1c-0.9.32/src/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/osmo-libasn1c-0.9.32/src/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/osmo-libasn1c-0.9.32/src/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/osmo-libasn1c-0.9.32/src/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/osmo-libasn1c-0.9.32/src/constr_SET_OF.c:630: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/osmo-libasn1c-0.9.32/src/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/osmo-libasn1c-0.9.32/src/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/osmo-libasn1c-0.9.32/src/per_encoder.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(arg->buffer, buffer, size); data/osmo-libasn1c-0.9.32/src/per_encoder.c:76: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/osmo-libasn1c-0.9.32/src/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/osmo-libasn1c-0.9.32/src/GeneralizedTime.c:116: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/osmo-libasn1c-0.9.32/src/OBJECT_IDENTIFIER.c:667: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/osmo-libasn1c-0.9.32/src/OCTET_STRING.c:2131: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/osmo-libasn1c-0.9.32/src/asn1helpers.c:111:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(out, (char *)in->buf, cpylen); data/osmo-libasn1c-0.9.32/src/constr_CHOICE.c:797: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/osmo-libasn1c-0.9.32/src/constr_CHOICE.c:1181: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/osmo-libasn1c-0.9.32/src/constr_SEQUENCE.c:869: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/osmo-libasn1c-0.9.32/src/constr_SEQUENCE.c:911: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/osmo-libasn1c-0.9.32/src/constr_SEQUENCE.c:934: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/osmo-libasn1c-0.9.32/src/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/osmo-libasn1c-0.9.32/src/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/osmo-libasn1c-0.9.32/src/constr_SET.c:1009: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/osmo-libasn1c-0.9.32/src/constr_SET.c:1053: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/osmo-libasn1c-0.9.32/src/constr_SET.c:1075: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/osmo-libasn1c-0.9.32/src/constr_SET_OF.c:662: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/osmo-libasn1c-0.9.32/src/constr_SET_OF.c:709: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/osmo-libasn1c-0.9.32/src/constr_SET_OF.c:768: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/osmo-libasn1c-0.9.32/src/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 = 89 Lines analyzed = 22252 in approximately 3.02 seconds (7362 lines/second) Physical Source Lines of Code (SLOC) = 15495 Hits@level = [0] 14 [1] 18 [2] 58 [3] 1 [4] 12 [5] 0 Hits@level+ = [0+] 103 [1+] 89 [2+] 71 [3+] 13 [4+] 12 [5+] 0 Hits/KSLOC@level+ = [0+] 6.64731 [1+] 5.74379 [2+] 4.58212 [3+] 0.83898 [4+] 0.774443 [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.