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/lcmaps-plugins-jobrep-1.5.6/src/api/jobrep_odbc_api.c Examining data/lcmaps-plugins-jobrep-1.5.6/src/api/jobrep_odbc_api.h Examining data/lcmaps-plugins-jobrep-1.5.6/src/jobrep/jobrep_test.h Examining data/lcmaps-plugins-jobrep-1.5.6/src/jobrep/lcmaps_plugin_prototypes.h Examining data/lcmaps-plugins-jobrep-1.5.6/src/jobrep/jobrep_data_handling.c Examining data/lcmaps-plugins-jobrep-1.5.6/src/jobrep/jobrep_data_handling.h Examining data/lcmaps-plugins-jobrep-1.5.6/src/jobrep/lcmaps_jobrep.c Examining data/lcmaps-plugins-jobrep-1.5.6/src/jobrep/jobrep_test.c FINAL RESULTS: data/lcmaps-plugins-jobrep-1.5.6/src/api/jobrep_odbc_api.c:1018:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(W, "lock tables %s write", table); data/lcmaps-plugins-jobrep-1.5.6/src/api/jobrep_odbc_api.c:1024:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(R, "lock tables %s read", table); data/lcmaps-plugins-jobrep-1.5.6/src/api/jobrep_odbc_api.c:1030:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(R, "lock tables %s read", table); data/lcmaps-plugins-jobrep-1.5.6/src/api/jobrep_odbc_api.c:1031:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(W, "lock tables %s write", table); data/lcmaps-plugins-jobrep-1.5.6/src/jobrep/jobrep_data_handling.c:1362: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. tz = getenv("TZ"); data/lcmaps-plugins-jobrep-1.5.6/src/jobrep/lcmaps_jobrep.c:406:24: [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. gatekeeper_jm_id = getenv("GATEKEEPER_JM_ID"); data/lcmaps-plugins-jobrep-1.5.6/src/api/jobrep_odbc_api.c:79: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 buf[250]; data/lcmaps-plugins-jobrep-1.5.6/src/api/jobrep_odbc_api.c:80: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 sqlstate[15]; data/lcmaps-plugins-jobrep-1.5.6/src/api/jobrep_odbc_api.c:156: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 V_OD_msg[200]; data/lcmaps-plugins-jobrep-1.5.6/src/api/jobrep_odbc_api.c:157: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 V_OD_stat[10]; data/lcmaps-plugins-jobrep-1.5.6/src/api/jobrep_odbc_api.c:498: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 colName[255]; data/lcmaps-plugins-jobrep-1.5.6/src/api/jobrep_odbc_api.c:711: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((char*)data2+offset, data, (size_t)bufsize_bytes); data/lcmaps-plugins-jobrep-1.5.6/src/api/jobrep_odbc_api.c:744:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char*)data2+offset, data, (size_t)bufsize_bytes); data/lcmaps-plugins-jobrep-1.5.6/src/api/jobrep_odbc_api.c:1013: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 R[1000]; data/lcmaps-plugins-jobrep-1.5.6/src/api/jobrep_odbc_api.c:1014: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 W[1000]; data/lcmaps-plugins-jobrep-1.5.6/src/jobrep/jobrep_data_handling.c:350: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 emptyname[5]; data/lcmaps-plugins-jobrep-1.5.6/src/jobrep/jobrep_data_handling.c:1003: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 emptyname[5]; data/lcmaps-plugins-jobrep-1.5.6/src/api/jobrep_odbc_api.c:103:58: [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 (strncmp((char *)search, "Duplicate", strlen("Duplicate")) == 0) { data/lcmaps-plugins-jobrep-1.5.6/src/jobrep/jobrep_data_handling.c:352:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(emptyname,"NULL",5); data/lcmaps-plugins-jobrep-1.5.6/src/jobrep/jobrep_data_handling.c:1005:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(emptyname,"NULL",5); data/lcmaps-plugins-jobrep-1.5.6/src/jobrep/jobrep_data_handling.c:1387:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (len == 0) len = strlen((char *)asn1time); ANALYSIS SUMMARY: Hits = 21 Lines analyzed = 3435 in approximately 0.20 seconds (17026 lines/second) Physical Source Lines of Code (SLOC) = 2229 Hits@level = [0] 16 [1] 4 [2] 11 [3] 2 [4] 4 [5] 0 Hits@level+ = [0+] 37 [1+] 21 [2+] 17 [3+] 6 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 16.5994 [1+] 9.42127 [2+] 7.62674 [3+] 2.69179 [4+] 1.79453 [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.