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/doodle-0.7.0/src/doodle/gettext.h Examining data/doodle-0.7.0/src/doodle/testtree4.c Examining data/doodle-0.7.0/src/doodle/getopt.c Examining data/doodle-0.7.0/src/doodle/getopt1.c Examining data/doodle-0.7.0/src/doodle/shutdown.c Examining data/doodle-0.7.0/src/doodle/semaphore.c Examining data/doodle-0.7.0/src/doodle/proftree2.c Examining data/doodle-0.7.0/src/doodle/org_gnunet_doodle_Doodle.h Examining data/doodle-0.7.0/src/doodle/testtree2.c Examining data/doodle-0.7.0/src/doodle/help.c Examining data/doodle-0.7.0/src/doodle/index.c Examining data/doodle-0.7.0/src/doodle/getopt.h Examining data/doodle-0.7.0/src/doodle/doodle.h Examining data/doodle-0.7.0/src/doodle/testio.c Examining data/doodle-0.7.0/src/doodle/helper2.h Examining data/doodle-0.7.0/src/doodle/convert.h Examining data/doodle-0.7.0/src/doodle/helper1.h Examining data/doodle-0.7.0/src/doodle/logreplay.c Examining data/doodle-0.7.0/src/doodle/files.c Examining data/doodle-0.7.0/src/doodle/tree.c Examining data/doodle-0.7.0/src/doodle/convert.c Examining data/doodle-0.7.0/src/doodle/shutdown.h Examining data/doodle-0.7.0/src/doodle/testtree.c Examining data/doodle-0.7.0/src/doodle/grow.c Examining data/doodle-0.7.0/src/doodle/testtree3.c Examining data/doodle-0.7.0/src/doodle/proftree3.c Examining data/doodle-0.7.0/src/doodle/semaphore.h Examining data/doodle-0.7.0/src/doodle/proftree.c Examining data/doodle-0.7.0/src/doodle/doodle.c Examining data/doodle-0.7.0/src/doodle/doodled.c FINAL RESULTS: data/doodle-0.7.0/src/doodle/doodle.c:125:5: [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(stdout, msg, args); data/doodle-0.7.0/src/doodle/doodle.c:319:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (! access(filename, R_OK | F_OK)) { data/doodle-0.7.0/src/doodle/doodle.c:621:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, data/doodle-0.7.0/src/doodle/doodled.c:136:5: [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(logfile, msg, args); data/doodle-0.7.0/src/doodle/doodled.c:229:7: [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(name, fe.filename); data/doodle-0.7.0/src/doodle/doodled.c:231:7: [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(name, (char*) fe.userdata); data/doodle-0.7.0/src/doodle/doodled.c:234:2: [4] (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). strcat(name, DIR_SEPARATOR_STR); data/doodle-0.7.0/src/doodle/doodled.c:235:7: [4] (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). strcat(name, fe.filename); data/doodle-0.7.0/src/doodle/files.c:127: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(dn, dirName); data/doodle-0.7.0/src/doodle/files.c:129:7: [4] (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). strcat(dn, DIR_SEPARATOR_STR); data/doodle-0.7.0/src/doodle/files.c:130:5: [4] (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). strcat(dn, finfo->d_name); data/doodle-0.7.0/src/doodle/files.c:201:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, "%s/%s", fm, fil_ptr); data/doodle-0.7.0/src/doodle/files.c:223:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, "%s\\%s", szCurDir, buffer); data/doodle-0.7.0/src/doodle/files.c:227: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(fn, buffer); data/doodle-0.7.0/src/doodle/logreplay.c:67:3: [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(stdout, msg, args); data/doodle-0.7.0/src/doodle/proftree.c:61:5: [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(stdout, msg, args); data/doodle-0.7.0/src/doodle/proftree.c:114:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, "%s/%s", fm, fil_ptr); data/doodle-0.7.0/src/doodle/proftree.c:136:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, "%s\\%s", szCurDir, buffer); data/doodle-0.7.0/src/doodle/proftree.c:140: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(fn, buffer); data/doodle-0.7.0/src/doodle/proftree2.c:65:5: [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(stdout, msg, args); data/doodle-0.7.0/src/doodle/proftree3.c:67:5: [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(stdout, msg, args); data/doodle-0.7.0/src/doodle/proftree3.c:87:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, data/doodle-0.7.0/src/doodle/proftree3.c:109:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, data/doodle-0.7.0/src/doodle/semaphore.h:77:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, \ data/doodle-0.7.0/src/doodle/semaphore.h:84:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, \ data/doodle-0.7.0/src/doodle/semaphore.h:91:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, \ data/doodle-0.7.0/src/doodle/semaphore.h:98:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, \ data/doodle-0.7.0/src/doodle/semaphore.h:105:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, \ data/doodle-0.7.0/src/doodle/testio.c:39:3: [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(stdout, msg, args); data/doodle-0.7.0/src/doodle/testtree.c:71:5: [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(stdout, msg, args); data/doodle-0.7.0/src/doodle/testtree.c:124:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, "%s/%s", fm, fil_ptr); data/doodle-0.7.0/src/doodle/testtree.c:146:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, "%s\\%s", szCurDir, buffer); data/doodle-0.7.0/src/doodle/testtree.c:150: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(fn, buffer); data/doodle-0.7.0/src/doodle/testtree2.c:56:5: [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(stdout, msg, args); data/doodle-0.7.0/src/doodle/testtree2.c:82:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(r->fn, data/doodle-0.7.0/src/doodle/testtree3.c:56:5: [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(stdout, msg, args); data/doodle-0.7.0/src/doodle/testtree3.c:82:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(r->fn, data/doodle-0.7.0/src/doodle/testtree4.c:62:5: [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(stdout, msg, args); data/doodle-0.7.0/src/doodle/testtree4.c:115:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, "%s/%s", fm, fil_ptr); data/doodle-0.7.0/src/doodle/testtree4.c:137:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, "%s\\%s", szCurDir, buffer); data/doodle-0.7.0/src/doodle/testtree4.c:141: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(fn, buffer); data/doodle-0.7.0/src/doodle/tree.c:670:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, data/doodle-0.7.0/src/doodle/tree.c:1912: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(tdatabase, data/doodle-0.7.0/src/doodle/tree.c:3426:7: [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. n = vsnprintf(NULL, 0, message, ap); data/doodle-0.7.0/src/doodle/tree.c:3430:7: [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. n = vsnprintf(buf, n, message, ap); data/doodle-0.7.0/src/doodle/doodle.c:486:12: [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. dbName = getenv("DOODLE_PATH"); data/doodle-0.7.0/src/doodle/doodle.c:489:9: [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. tmp = getenv("PRUNEPATHS"); data/doodle-0.7.0/src/doodle/doodle.c:513:9: [3] (buffer) getopt_long: 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. c = getopt_long(argc, data/doodle-0.7.0/src/doodle/doodled.c:801:12: [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. dbName = getenv("DOODLE_PATH"); data/doodle-0.7.0/src/doodle/doodled.c:804:9: [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. tmp = getenv("PRUNEPATHS"); data/doodle-0.7.0/src/doodle/doodled.c:824:9: [3] (buffer) getopt_long: 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. c = getopt_long(argc, data/doodle-0.7.0/src/doodle/files.c:180: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. fm = getenv("HOME"); data/doodle-0.7.0/src/doodle/getopt.c:204:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *getenv (); data/doodle-0.7.0/src/doodle/getopt.c:395:21: [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. posixly_correct = getenv ("POSIXLY_CORRECT"); data/doodle-0.7.0/src/doodle/getopt.c:963:1: [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. getopt (argc, argv, optstring) data/doodle-0.7.0/src/doodle/getopt.c:991:11: [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. c = getopt (argc, argv, "abc:d:0123456789"); data/doodle-0.7.0/src/doodle/getopt.h:108:12: [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. extern int getopt (int argc, char *const *argv, const char *shortopts); data/doodle-0.7.0/src/doodle/getopt.h:110:12: [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. extern int getopt (); data/doodle-0.7.0/src/doodle/getopt.h:112:12: [3] (buffer) getopt_long: 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. extern int getopt_long (int argc, char *const *argv, const char *shortopts, data/doodle-0.7.0/src/doodle/getopt.h:124:12: [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. extern int getopt (); data/doodle-0.7.0/src/doodle/getopt.h:125:12: [3] (buffer) getopt_long: 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. extern int getopt_long (); data/doodle-0.7.0/src/doodle/getopt1.c:64:1: [3] (buffer) getopt_long: 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. getopt_long (argc, argv, options, long_options, opt_index) data/doodle-0.7.0/src/doodle/getopt1.c:119:11: [3] (buffer) getopt_long: 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. c = getopt_long (argc, argv, "abc:d:0123456789", data/doodle-0.7.0/src/doodle/proftree.c:93: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. fm = getenv("HOME"); data/doodle-0.7.0/src/doodle/proftree2.c:83:22: [3] (random) lrand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. test[i] = 'A' + (lrand48() % 26); data/doodle-0.7.0/src/doodle/proftree3.c:131:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(i); data/doodle-0.7.0/src/doodle/testtree.c:103: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. fm = getenv("HOME"); data/doodle-0.7.0/src/doodle/testtree4.c:94: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. fm = getenv("HOME"); data/doodle-0.7.0/src/doodle/convert.c:62: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(ret, data/doodle-0.7.0/src/doodle/doodle.c:253:19: [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). cls.logFile = fopen(log, "w+"); data/doodle-0.7.0/src/doodle/doodled.c:581: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). logfile = fopen(log, "w+"); data/doodle-0.7.0/src/doodle/doodled.c:755:12: [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). nullfd = open("/dev/null", data/doodle-0.7.0/src/doodle/files.c:162: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 buffer[512]; data/doodle-0.7.0/src/doodle/files.c:215: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 szCurDir[MAX_PATH + 1]; data/doodle-0.7.0/src/doodle/getopt.c:323: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 (new_str, __getopt_nonoption_flags, nonoption_flags_max_len); data/doodle-0.7.0/src/doodle/getopt.c:435:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (__getopt_nonoption_flags, orig_str, len); data/doodle-0.7.0/src/doodle/grow.c:113:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp, data/doodle-0.7.0/src/doodle/help.c:87: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(scp, data/doodle-0.7.0/src/doodle/help.c:103:7: [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(scp, data/doodle-0.7.0/src/doodle/index.c:162: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 buffer[FILENAME_MAX+2]; data/doodle-0.7.0/src/doodle/index.c:409:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char section[MAX_LENGTH+1]; data/doodle-0.7.0/src/doodle/logreplay.c:77: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 section[MAX_LENGTH+1]; data/doodle-0.7.0/src/doodle/logreplay.c:118: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 key[MAX_KEYWORD_LEN+1]; data/doodle-0.7.0/src/doodle/logreplay.c:130:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fclose(fopen(TNAME, "a+")); data/doodle-0.7.0/src/doodle/logreplay.c:131:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). in = fopen(argv[1], "r"); data/doodle-0.7.0/src/doodle/proftree.c:75: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 buffer[512]; data/doodle-0.7.0/src/doodle/proftree.c:128: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 szCurDir[MAX_PATH + 1]; data/doodle-0.7.0/src/doodle/proftree.c:149: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 astring[DEPTH+1]; data/doodle-0.7.0/src/doodle/proftree.c:150: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 bstring[DEPTH+DIST+1]; data/doodle-0.7.0/src/doodle/proftree3.c:91: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). fclose(fopen(fn, "a+")); data/doodle-0.7.0/src/doodle/semaphore.c:74: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). #define FOPEN fopen data/doodle-0.7.0/src/doodle/testio.c:56:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/tmp/doodle_bio_test", data/doodle-0.7.0/src/doodle/testtree.c:85: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 buffer[512]; data/doodle-0.7.0/src/doodle/testtree.c:138: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 szCurDir[MAX_PATH + 1]; data/doodle-0.7.0/src/doodle/testtree2.c:86:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fclose(fopen(r->fn, "a+")); data/doodle-0.7.0/src/doodle/testtree3.c:86:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fclose(fopen(r->fn, "a+")); data/doodle-0.7.0/src/doodle/testtree4.c:76: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 buffer[512]; data/doodle-0.7.0/src/doodle/testtree4.c:129: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 szCurDir[MAX_PATH + 1]; data/doodle-0.7.0/src/doodle/tree.c:332:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, data/doodle-0.7.0/src/doodle/tree.c:370: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(&bio->buffer[bio->off - bio->bstart], data/doodle-0.7.0/src/doodle/tree.c:409:12: [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[4]; data/doodle-0.7.0/src/doodle/tree.c:431:12: [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[8]; data/doodle-0.7.0/src/doodle/tree.c:452:12: [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[8]; data/doodle-0.7.0/src/doodle/tree.c:466:12: [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[4]; data/doodle-0.7.0/src/doodle/tree.c:495:12: [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[8]; data/doodle-0.7.0/src/doodle/tree.c:524:12: [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[4]; data/doodle-0.7.0/src/doodle/tree.c:553:12: [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[8]; data/doodle-0.7.0/src/doodle/tree.c:581:12: [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[4]; data/doodle-0.7.0/src/doodle/tree.c:600:12: [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[8]; data/doodle-0.7.0/src/doodle/tree.c:618:12: [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[8]; data/doodle-0.7.0/src/doodle/tree.c:1565:10: [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. signed char magic[8]; data/doodle-0.7.0/src/doodle/tree.c:1581:11: [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). ifd = open(database, data/doodle-0.7.0/src/doodle/tree.c:1585:11: [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). ifd = open(database, data/doodle-0.7.0/src/doodle/tree.c:1615:7: [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(magic, data/doodle-0.7.0/src/doodle/tree.c:1791:11: [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). ifd = open(database, data/doodle-0.7.0/src/doodle/tree.c:1795:11: [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). ifd = open(database, data/doodle-0.7.0/src/doodle/tree.c:1917:11: [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). fdt = open(tdatabase, data/doodle-0.7.0/src/doodle/tree.c:1921:11: [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). fdt = open(tdatabase, data/doodle-0.7.0/src/doodle/tree.c:1968: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(pathTab[ptc-1], data/doodle-0.7.0/src/doodle/tree.c:2590:8: [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(mlsnew, data/doodle-0.7.0/src/doodle/tree.c:2594:8: [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(&mlsnew[mlsroot->mls_size+1], data/doodle-0.7.0/src/doodle/tree.c:2657:8: [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(mlsnew, data/doodle-0.7.0/src/doodle/tree.c:2964: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. const char * filenames[2]; data/doodle-0.7.0/src/doodle/doodle.c:135:7: [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). i = strlen(prunepaths); data/doodle-0.7.0/src/doodle/doodle.c:221: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). for (i=strlen(dbName);i>=0;i--) { data/doodle-0.7.0/src/doodle/doodle.c:425: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). if (strlen(argv[i]) > MAX_LENGTH) { data/doodle-0.7.0/src/doodle/doodle.c:430: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). if (strlen(argv[i]) > MAX_LENGTH/2) { data/doodle-0.7.0/src/doodle/doodle.c:435:4: [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). strlen(argv[i]), data/doodle-0.7.0/src/doodle/doodle.c:646:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i=strlen(name)-1;i>=0;i--) { data/doodle-0.7.0/src/doodle/doodle.c:663:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i=strlen(name)-1;i>=0;i--) { data/doodle-0.7.0/src/doodle/doodled.c:100:7: [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). i = strlen(prunepaths); data/doodle-0.7.0/src/doodle/doodled.c:227:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name = malloc(strlen(fe.filename) + strlen((char*) fe.userdata) + 2); data/doodle-0.7.0/src/doodle/doodled.c:227: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). name = malloc(strlen(fe.filename) + strlen((char*) fe.userdata) + 2); data/doodle-0.7.0/src/doodle/doodled.c:232:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( (strlen((char*)fe.userdata) > 0) && data/doodle-0.7.0/src/doodle/doodled.c:233:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (((char*)fe.userdata)[strlen(fe.userdata)-1] != DIR_SEPARATOR) ) data/doodle-0.7.0/src/doodle/doodled.c:240:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(cls->ename))) { data/doodle-0.7.0/src/doodle/doodled.c:289: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). strlen(dic->ename))) data/doodle-0.7.0/src/doodle/doodled.c:599: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). for (i=strlen(dbName);i>=0;i--) { data/doodle-0.7.0/src/doodle/doodled.c:744:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (0 < read(filedes[0], &c, sizeof(char))) { data/doodle-0.7.0/src/doodle/files.c:125: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). dn = MALLOC(strlen(dirName) + data/doodle-0.7.0/src/doodle/files.c:126:3: [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). strlen(finfo->d_name) + 2); data/doodle-0.7.0/src/doodle/files.c:128:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (dirName[strlen(dirName)-1] != DIR_SEPARATOR) data/doodle-0.7.0/src/doodle/files.c:199:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fn = MALLOC(strlen(fm) + 1 + strlen(fil_ptr) + 1); data/doodle-0.7.0/src/doodle/files.c:199:32: [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). fn = MALLOC(strlen(fm) + 1 + strlen(fil_ptr) + 1); data/doodle-0.7.0/src/doodle/files.c:217:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (lRet + strlen(fn) + 1 > (_MAX_PATH + 1)) data/doodle-0.7.0/src/doodle/getopt.c:228:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). extern int strlen (const char *); data/doodle-0.7.0/src/doodle/getopt.c:426: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). int len = nonoption_flags_max_len = strlen (orig_str); data/doodle-0.7.0/src/doodle/getopt.c:652:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). == (unsigned int) strlen (p->name)) data/doodle-0.7.0/src/doodle/getopt.c:676:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/doodle-0.7.0/src/doodle/getopt.c:708: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). nextchar += strlen (nextchar); data/doodle-0.7.0/src/doodle/getopt.c:724: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). nextchar += strlen (nextchar); data/doodle-0.7.0/src/doodle/getopt.c:729:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/doodle-0.7.0/src/doodle/getopt.c:839:51: [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 ((unsigned int) (nameend - nextchar) == strlen (p->name)) data/doodle-0.7.0/src/doodle/getopt.c:862: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). nextchar += strlen (nextchar); data/doodle-0.7.0/src/doodle/getopt.c:881:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/doodle-0.7.0/src/doodle/getopt.c:895:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/doodle-0.7.0/src/doodle/getopt.c:899: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). nextchar += strlen (nextchar); data/doodle-0.7.0/src/doodle/help.c:65:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = 8 + strlen(opt[i].longArg); data/doodle-0.7.0/src/doodle/help.c:69: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). slen += 1+strlen(opt[i].mandatoryArg); data/doodle-0.7.0/src/doodle/help.c:80: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). ml = strlen(trans); data/doodle-0.7.0/src/doodle/index.c:99:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, &data[pos], len - pos); data/doodle-0.7.0/src/doodle/index.c:105:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, &data[pos], len - pos); data/doodle-0.7.0/src/doodle/index.c:237:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(filedes2[0], &buffer[pos], FILENAME_MAX + 1 - pos); data/doodle-0.7.0/src/doodle/index.c:241:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = strlen(buffer) + 1; data/doodle-0.7.0/src/doodle/index.c:262:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = strlen(acc_ctx.keywords[acc_ctx.count]); data/doodle-0.7.0/src/doodle/index.c:275:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(filedes2[0], &buffer[pos], FILENAME_MAX + 1 - pos); data/doodle-0.7.0/src/doodle/index.c:334:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). DO_WRITE(eproc->send_pipe, filename, strlen(filename)+1); data/doodle-0.7.0/src/doodle/index.c:407:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = strlen(cpos); data/doodle-0.7.0/src/doodle/index.c:415:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(section, data/doodle-0.7.0/src/doodle/logreplay.c:75: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). slen = strlen(key); data/doodle-0.7.0/src/doodle/logreplay.c:82:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(section, data/doodle-0.7.0/src/doodle/logreplay.c:140: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). key[strlen(key)-1] = '\0'; /* kill newline */ data/doodle-0.7.0/src/doodle/proftree.c:112:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fn = MALLOC(strlen(fm) + 1 + strlen(fil_ptr) + 1); data/doodle-0.7.0/src/doodle/proftree.c:112:32: [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). fn = MALLOC(strlen(fm) + 1 + strlen(fil_ptr) + 1); data/doodle-0.7.0/src/doodle/proftree.c:130:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (lRet + strlen(fn) + 1 > (_MAX_PATH + 1)) data/doodle-0.7.0/src/doodle/proftree3.c:83:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fn = malloc(strlen(DBNAME) + 20); data/doodle-0.7.0/src/doodle/testtree.c:122:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fn = MALLOC(strlen(fm) + 1 + strlen(fil_ptr) + 1); data/doodle-0.7.0/src/doodle/testtree.c:122:32: [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). fn = MALLOC(strlen(fm) + 1 + strlen(fil_ptr) + 1); data/doodle-0.7.0/src/doodle/testtree.c:140:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (lRet + strlen(fn) + 1 > (_MAX_PATH + 1)) data/doodle-0.7.0/src/doodle/testtree2.c:81: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). r->fn = malloc(strlen(TNAME) + 20); data/doodle-0.7.0/src/doodle/testtree3.c:81: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). r->fn = malloc(strlen(TNAME) + 20); data/doodle-0.7.0/src/doodle/testtree4.c:113:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fn = MALLOC(strlen(fm) + 1 + strlen(fil_ptr) + 1); data/doodle-0.7.0/src/doodle/testtree4.c:113:32: [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). fn = MALLOC(strlen(fm) + 1 + strlen(fil_ptr) + 1); data/doodle-0.7.0/src/doodle/testtree4.c:131:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (lRet + strlen(fn) + 1 > (_MAX_PATH + 1)) data/doodle-0.7.0/src/doodle/tree.c:184:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buf, cnt); data/doodle-0.7.0/src/doodle/tree.c:644: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(buf); data/doodle-0.7.0/src/doodle/tree.c:646:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). WRITEALL(fd, buf, strlen(buf)); data/doodle-0.7.0/src/doodle/tree.c:668: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). slen = strlen(pathTab[pid]); data/doodle-0.7.0/src/doodle/tree.c:672:3: [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(buf, data/doodle-0.7.0/src/doodle/tree.c:692: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). slen = strlen(fn); data/doodle-0.7.0/src/doodle/tree.c:700:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (slen == strlen(pathTab[i])) ) { data/doodle-0.7.0/src/doodle/tree.c:1157:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (ciy >= strlen(tree->cis[cix])) ) { data/doodle-0.7.0/src/doodle/tree.c:1424: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). (node->c < &tree->cis[i][strlen(tree->cis[i])]) ) { data/doodle-0.7.0/src/doodle/tree.c:1432: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). (ciy >= strlen(tree->cis[cix])) ) { data/doodle-0.7.0/src/doodle/tree.c:1911: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). tdatabase = MALLOC(strlen(tree->database) + 2); data/doodle-0.7.0/src/doodle/tree.c:1914: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(tdatabase, data/doodle-0.7.0/src/doodle/tree.c:1953: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). slen = strlen(fn); data/doodle-0.7.0/src/doodle/tree.c:1961:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (slen == strlen(pathTab[j])) ) data/doodle-0.7.0/src/doodle/tree.c:2275: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). (strlen(searchString) == 0) ) data/doodle-0.7.0/src/doodle/tree.c:2327: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). if (strlen(cisp) > strlen(searchString)) data/doodle-0.7.0/src/doodle/tree.c:2327: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). if (strlen(cisp) > strlen(searchString)) data/doodle-0.7.0/src/doodle/tree.c:2328: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). cisp = &cisp[strlen(cisp) - strlen(searchString)]; data/doodle-0.7.0/src/doodle/tree.c:2328:35: [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). cisp = &cisp[strlen(cisp) - strlen(searchString)]; data/doodle-0.7.0/src/doodle/tree.c:2381:7: [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(cisp) == 0) { data/doodle-0.7.0/src/doodle/tree.c:2401: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). pos->clength = strlen(cisp0); data/doodle-0.7.0/src/doodle/tree.c:2442:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (i < strlen(cisp0)) && data/doodle-0.7.0/src/doodle/tree.c:2770:7: [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(cisp0) > 0) { data/doodle-0.7.0/src/doodle/tree.c:2771: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). if (strlen(cisp0) == 1) { data/doodle-0.7.0/src/doodle/tree.c:2775:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(cisp0) > 255) { data/doodle-0.7.0/src/doodle/tree.c:2792: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). pos->clength = strlen(cisp0); ANALYSIS SUMMARY: Hits = 210 Lines analyzed = 10689 in approximately 0.31 seconds (34915 lines/second) Physical Source Lines of Code (SLOC) = 7817 Hits@level = [0] 131 [1] 87 [2] 55 [3] 23 [4] 45 [5] 0 Hits@level+ = [0+] 341 [1+] 210 [2+] 123 [3+] 68 [4+] 45 [5+] 0 Hits/KSLOC@level+ = [0+] 43.6229 [1+] 26.8645 [2+] 15.7349 [3+] 8.69899 [4+] 5.75668 [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.