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-basic-1.7.1/src/dummy/lcmaps_dummy_bad.c Examining data/lcmaps-plugins-basic-1.7.1/src/dummy/lcmaps_dummy_good.c Examining data/lcmaps-plugins-basic-1.7.1/src/poolaccount/lcmaps_poolaccount.c Examining data/lcmaps-plugins-basic-1.7.1/src/poolaccount/plugin_test.c Examining data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c Examining data/lcmaps-plugins-basic-1.7.1/src/posix_enf/plugin_test.c Examining data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_plugin_prototypes.h Examining data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapfile.c Examining data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapdir.c Examining data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapdir.h Examining data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapfile.h Examining data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c Examining data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/plugin_test.c Examining data/lcmaps-plugins-basic-1.7.1/src/localaccount/lcmaps_localaccount.c Examining data/lcmaps-plugins-basic-1.7.1/src/localaccount/plugin_test.c Examining data/lcmaps-plugins-basic-1.7.1/src/ban_dn/lcmaps_ban_dn.c Examining data/lcmaps-plugins-basic-1.7.1/src/ban_dn/plugin_test.c FINAL RESULTS: data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapfile.c:307: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. len=snprintf(path, 0, SECURITY_DIR"%s", file); data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapfile.c:317:6: [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(path, (size_t)(len+1), SECURITY_DIR"%s", file); data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapfile.c:507:7: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len=snprintf(path,0, "%s/"LOCAL_GRIDMAP, pw->pw_dir); data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapfile.c:517: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(path,(size_t)(len+1),"%s/"LOCAL_GRIDMAP, data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapdir.c:317:18: [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 ( (char_p=getenv("GRIDMAPDIR"))==NULL || char_p[0]=='\0') { data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapfile.c:472: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. if ( ( (env="GRIDMAP", char_p = getenv(env))!= NULL || data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapfile.c:473: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. (env="GLOBUSMAP",char_p = getenv(env))!= NULL || data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapfile.c:474: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. (env="globusmap",char_p = getenv(env))!= NULL || data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapfile.c:475: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. (env="GlobusMap",char_p = getenv(env))!= NULL ) && char_p[0]!='\0') data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1165: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 groupstr[10]; data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1174: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 * GIDValue[2]; data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1398: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 prigroupstr[10]; data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1402: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 * GIDValue[2]; data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1537:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(path, "r")) == NULL) data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapdir.c:969:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (fd=open(mapping_filename, O_WRONLY|O_APPEND)) < 0 ) { data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapfile.c:396:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( (fd=open(filename,O_RDONLY))<0) { data/lcmaps-plugins-basic-1.7.1/src/dummy/lcmaps_dummy_good.c:206:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/dummy/lcmaps_dummy_good.c:209:34: [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). for (j = 0; j < strlen(argv[i + 1]); j++) data/lcmaps-plugins-basic-1.7.1/src/dummy/lcmaps_dummy_good.c:232:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/dummy/lcmaps_dummy_good.c:235:34: [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). for (j = 0; j < strlen(argv[i + 1]); j++) data/lcmaps-plugins-basic-1.7.1/src/dummy/lcmaps_dummy_good.c:258:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/dummy/lcmaps_dummy_good.c:261:34: [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). for (j = 0; j < strlen(argv[i + 1]); j++) data/lcmaps-plugins-basic-1.7.1/src/dummy/lcmaps_dummy_good.c:284:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/dummy/lcmaps_dummy_good.c:305:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/dummy/lcmaps_dummy_good.c:326:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:261: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(ldap_cred_log_uid); data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:278: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(ldap_cred_log_pgid); data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:294: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(ldap_cred_log_sgid); data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:307: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(ldap_cred_log); data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:314: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(ldap_cred_log); data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:321: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(ldap_cred_log); data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:372:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:375:34: [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). for (j = 0; j < strlen(argv[i + 1]); j++) data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:406:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:409:34: [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). for (j = 0; j < strlen(argv[i + 1]); j++) data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:440:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:443:34: [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). for (j = 0; j < strlen(argv[i + 1]); j++) data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:472:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:475:34: [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). for (j = 0; j < strlen(argv[i + 1]); j++) data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:504:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:518:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:544:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:558:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:572:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:586:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:601:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:604:34: [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). for (j = 0; j < strlen(argv[i + 1]); j++) data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1189: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). filtersize = strlen(filterprefix)+strlen(groupstr)+strlen(filtersuffix)+1; data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1189:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). filtersize = strlen(filterprefix)+strlen(groupstr)+strlen(filtersuffix)+1; data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1189:56: [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). filtersize = strlen(filterprefix)+strlen(groupstr)+strlen(filtersuffix)+1; data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1199: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). membersize = strlen(filterprefix) + strlen(groupstr) + strlen(memberUidfilter) + strlen(username) + strlen(filtersuffix) +1; data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1199:41: [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). membersize = strlen(filterprefix) + strlen(groupstr) + strlen(memberUidfilter) + strlen(username) + strlen(filtersuffix) +1; data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1199:60: [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). membersize = strlen(filterprefix) + strlen(groupstr) + strlen(memberUidfilter) + strlen(username) + strlen(filtersuffix) +1; data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1199:86: [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). membersize = strlen(filterprefix) + strlen(groupstr) + strlen(memberUidfilter) + strlen(username) + strlen(filtersuffix) +1; data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1199:105: [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). membersize = strlen(filterprefix) + strlen(groupstr) + strlen(memberUidfilter) + strlen(username) + strlen(filtersuffix) +1; data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1204: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). dnsize = strlen(dnprefix) + strlen(groupname) + strlen(searchBase) +2; /*'/0' and ',' */ data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1204: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). dnsize = strlen(dnprefix) + strlen(groupname) + strlen(searchBase) +2; /*'/0' and ',' */ data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1204:54: [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). dnsize = strlen(dnprefix) + strlen(groupname) + strlen(searchBase) +2; /*'/0' and ',' */ data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1425: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). dnsize = strlen(dnprefix) + strlen(username) + strlen(searchBase) +3; /*'/0' and ',' */ data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1425: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). dnsize = strlen(dnprefix) + strlen(username) + strlen(searchBase) +3; /*'/0' and ',' */ data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1425:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dnsize = strlen(dnprefix) + strlen(username) + strlen(searchBase) +3; /*'/0' and ',' */ data/lcmaps-plugins-basic-1.7.1/src/ldap_enf/lcmaps_ldap.c:1548:17: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc(fp)) != EOF && (c != '\n')) count++; data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:245:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), "uid=%u(%s)", (unsigned)uid, p -> pw_name); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:245:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), "uid=%u(%s)", (unsigned)uid, p -> pw_name); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:247:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), "uid=%u", (unsigned)uid); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:247:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), "uid=%u", (unsigned)uid); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:252:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), ",euid=%u(%s)", (unsigned)euid, p -> pw_name); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:252:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), ",euid=%u(%s)", (unsigned)euid, p -> pw_name); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:254:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), ",euid=%u", (unsigned)euid); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:254:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), ",euid=%u", (unsigned)euid); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:259:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), ",gid=%u(%s)", (unsigned)gid, g -> gr_name); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:259:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), ",gid=%u(%s)", (unsigned)gid, g -> gr_name); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:261:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), ",gid=%u", (unsigned)gid); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:261:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), ",gid=%u", (unsigned)gid); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:266:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), ",egid=%u(%s)", (unsigned)egid, g -> gr_name); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:266:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), ",egid=%u(%s)", (unsigned)egid, g -> gr_name); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:268:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), ",egid=%u", (unsigned)egid); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:268:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), ",egid=%u", (unsigned)egid); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:295: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). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), ",sgid=%u(%s)", (unsigned)(list[t]), g -> gr_name); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:295:59: [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). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), ",sgid=%u(%s)", (unsigned)(list[t]), g -> gr_name); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:297: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). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), ",sgid=%u", (unsigned)(list[t])); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:297:59: [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). snprintf (&line_buf[strlen(line_buf)], 1024 - strlen(line_buf), ",sgid=%u", (unsigned)(list[t])); data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:348:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:351:34: [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). for (j = 0; j < strlen(argv[i + 1]); j++) data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:382:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:385:34: [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). for (j = 0; j < strlen(argv[i + 1]); j++) data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:417:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:420:34: [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). for (j = 0; j < strlen(argv[i + 1]); j++) data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:448:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/posix_enf/lcmaps_posix.c:474:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[i + 1] != NULL) && (strlen(argv[i + 1]) > 0)) data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapdir.c:362: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). if ( strlen(mapping) < (poollen=strlen(pool)) || data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapdir.c:362:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strlen(mapping) < (poollen=strlen(pool)) || data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapdir.c:399: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). leaselen=strlen(oldlease)+15; data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapdir.c:440:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len=3*strlen(idp)+1; data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapdir.c:453:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer+j,idp+i+1,len-j); data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapfile.c:233:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(mapping, searchstr, strlen(searchstr))==0) { data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapfile.c:238:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(mapping, searchstr, strlen(searchstr))!=0) { data/lcmaps-plugins-basic-1.7.1/src/utils/lcmaps_gridmapfile.c:423:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd,mybuffer,size)!=(ssize_t)size) { ANALYSIS SUMMARY: Hits = 98 Lines analyzed = 7655 in approximately 0.32 seconds (24212 lines/second) Physical Source Lines of Code (SLOC) = 4165 Hits@level = [0] 33 [1] 82 [2] 7 [3] 5 [4] 4 [5] 0 Hits@level+ = [0+] 131 [1+] 98 [2+] 16 [3+] 9 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 31.4526 [1+] 23.5294 [2+] 3.84154 [3+] 2.16086 [4+] 0.960384 [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.