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/slurm-0.4.3/config.h Examining data/slurm-0.4.3/error.c Examining data/slurm-0.4.3/error.h Examining data/slurm-0.4.3/os.h Examining data/slurm-0.4.3/slurm.c Examining data/slurm-0.4.3/slurm.h Examining data/slurm-0.4.3/src/freebsd.c Examining data/slurm-0.4.3/src/freebsd.h Examining data/slurm-0.4.3/src/hpux.c Examining data/slurm-0.4.3/src/hpux.h Examining data/slurm-0.4.3/src/if_media.c Examining data/slurm-0.4.3/src/if_media.h Examining data/slurm-0.4.3/src/linux.c Examining data/slurm-0.4.3/src/linux.h Examining data/slurm-0.4.3/src/macos.c Examining data/slurm-0.4.3/src/macos.h Examining data/slurm-0.4.3/src/netbsd.c Examining data/slurm-0.4.3/src/netbsd.h Examining data/slurm-0.4.3/src/openbsd.c Examining data/slurm-0.4.3/src/openbsd.h Examining data/slurm-0.4.3/src/solaris.c Examining data/slurm-0.4.3/src/solaris.h Examining data/slurm-0.4.3/src/unsupported.c Examining data/slurm-0.4.3/src/unsupported.h Examining data/slurm-0.4.3/theme.c Examining data/slurm-0.4.3/theme.h FINAL RESULTS: data/slurm-0.4.3/error.c:48: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, msg, arguments); data/slurm-0.4.3/slurm.c:96: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. (void)vsnprintf(final, 80, strg, trans); data/slurm-0.4.3/slurm.c:1606:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system("clear"); data/slurm-0.4.3/src/hpux.c:51:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tmpinterfacestring,ifdata.if_name); data/slurm-0.4.3/slurm.c:1240:18: [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 ((op = getopt(argc, argv, "Lhzd:clsi:t:")) != EOF) data/slurm-0.4.3/theme.c:66:27: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. search_paths[1] = strcat(getenv("HOME"), "/.slurm"); /* $HOME/.slurm/ */ data/slurm-0.4.3/slurm.c:138: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 draw[DRAWLEN+1]; data/slurm-0.4.3/slurm.c:257: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 draw[DRAWLEN+1]; /* what we draw on the screen */ data/slurm-0.4.3/slurm.c:551: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 draw[DRAWLEN+1]; /* what we draw on the screen */ data/slurm-0.4.3/slurm.c:858: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 draw[DRAWLEN+1]; /* what we draw on the screen */ data/slurm-0.4.3/slurm.c:1219: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 hostname[MAXHOSTNAMELEN+1]; data/slurm-0.4.3/slurm.h: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 if_name[10]; /* The device name given as start parameter*/ data/slurm-0.4.3/slurm.h:113: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 if_speedstring[12]; /* the measuring unit like Mbit, kbit */ data/slurm-0.4.3/src/hpux.c:42: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 tmpinterfacestring[sizeof(ifdata.if_name)+1],*strstrmatch; data/slurm-0.4.3/src/linux.c:48: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 buffer[BUFSIZE]; data/slurm-0.4.3/src/linux.c:57:29: [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 ((proc_net_dev = fopen(PATH_NET_DEV, "r")) == NULL) data/slurm-0.4.3/src/macos.c:20: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 s[32]; data/slurm-0.4.3/src/macos.c:88: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 s[32]; data/slurm-0.4.3/src/netbsd.c:20: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 s[32]; data/slurm-0.4.3/src/netbsd.c:88: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 s[32]; data/slurm-0.4.3/src/openbsd.c:20: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 s[32]; data/slurm-0.4.3/src/openbsd.c:90: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 s[32]; data/slurm-0.4.3/theme.c:50: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[BUFSIZ+1]; data/slurm-0.4.3/theme.c:51: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 filename[BUFSIZ+1]; data/slurm-0.4.3/theme.c:52:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *search_paths[5]; data/slurm-0.4.3/theme.c:66: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. search_paths[1] = strcat(getenv("HOME"), "/.slurm"); /* $HOME/.slurm/ */ data/slurm-0.4.3/theme.c:75:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f = fopen(filename, "r")) != NULL) data/slurm-0.4.3/theme.c:83:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f = fopen(filename, "r")) == NULL) data/slurm-0.4.3/theme.c:181: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[32]; data/slurm-0.4.3/theme.c:208: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[32]; data/slurm-0.4.3/theme.c:241: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[32]; data/slurm-0.4.3/slurm.c:98: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). where = (int)(40 - (strlen(final) / 2)); data/slurm-0.4.3/slurm.c:145:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:145:44: [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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:150:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:150:44: [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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:155:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:155:44: [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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:160:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:160:44: [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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:168:8: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:168:49: [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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:173:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:173:46: [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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:180:17: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:180: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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:186:17: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:186: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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:317:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:317: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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:321:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:321: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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:356:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:356:44: [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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:362:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:362:44: [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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:618:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:618: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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:621:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:621: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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:637:4: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:637:45: [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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:652:4: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:652:45: [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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:666:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:666:44: [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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:672:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:672:44: [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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:920:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:920: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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:936:4: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:936:45: [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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:950:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:950:44: [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). strncat(draw, " ", DRAWLEN-strlen(draw)); data/slurm-0.4.3/slurm.c:1303:6: [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(ifdata.if_name) == 0) data/slurm-0.4.3/slurm.c:1485:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100*1000); /* 10th of a second */ data/slurm-0.4.3/src/hpux.c:52:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(tmpinterfacestring," "); data/slurm-0.4.3/src/if_media.c:64:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifmr.ifm_name, (char *)ifstring, sizeof(ifmr.ifm_name)); data/slurm-0.4.3/src/macos.c:56:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s, sdl->sdl_data, sdl->sdl_nlen); data/slurm-0.4.3/src/macos.c:126:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s, sdl->sdl_data, sdl->sdl_nlen); data/slurm-0.4.3/src/netbsd.c:56:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s, sdl->sdl_data, sdl->sdl_nlen); data/slurm-0.4.3/src/netbsd.c:126:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s, sdl->sdl_data, sdl->sdl_nlen); data/slurm-0.4.3/src/openbsd.c:57:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s, sdl->sdl_data, sdl->sdl_nlen); data/slurm-0.4.3/src/openbsd.c:133:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s, sdl->sdl_data, sdl->sdl_nlen); data/slurm-0.4.3/src/solaris.c:57:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, ifrp->ifr_name, sizeof(ifr.ifr_name)); data/slurm-0.4.3/theme.c:184:6: [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(str) > 31) return val; data/slurm-0.4.3/theme.c:186: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). for (i = 0; i < strlen(str); i++) data/slurm-0.4.3/theme.c:211:6: [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(str) > 31) return val; data/slurm-0.4.3/theme.c:213: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). for (i = 0; i < strlen(str); i++) data/slurm-0.4.3/theme.c:244:6: [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(str) > 31) return e; data/slurm-0.4.3/theme.c:246: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). for (i = 0; i < strlen(str); i++) ANALYSIS SUMMARY: Hits = 91 Lines analyzed = 3835 in approximately 0.12 seconds (31337 lines/second) Physical Source Lines of Code (SLOC) = 2753 Hits@level = [0] 55 [1] 60 [2] 25 [3] 2 [4] 4 [5] 0 Hits@level+ = [0+] 146 [1+] 91 [2+] 31 [3+] 6 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 53.0331 [1+] 33.0548 [2+] 11.2604 [3+] 2.17944 [4+] 1.45296 [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.