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/cccd-0.3beta4/cccd.h Examining data/cccd-0.3beta4/cd.c Examining data/cccd-0.3beta4/cddb.h Examining data/cccd-0.3beta4/cddbp.h Examining data/cccd-0.3beta4/general.h Examining data/cccd-0.3beta4/icons.h Examining data/cccd-0.3beta4/info.h Examining data/cccd-0.3beta4/misc.c Examining data/cccd-0.3beta4/misc.h Examining data/cccd-0.3beta4/options.c Examining data/cccd-0.3beta4/options.h Examining data/cccd-0.3beta4/cccd.c Examining data/cccd-0.3beta4/cddb.c Examining data/cccd-0.3beta4/info.c Examining data/cccd-0.3beta4/cd.h Examining data/cccd-0.3beta4/cddbp.c FINAL RESULTS: data/cccd-0.3beta4/cccd.c:700:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(status_string, "%s %s", disp.status_string, disp.mode_string); data/cccd-0.3beta4/cccd.c:927:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(disp.status_string, "%s", "Playing"); data/cccd-0.3beta4/cccd.c:930:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(disp.status_string, "%s", "Paused"); data/cccd-0.3beta4/cccd.c:933:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(disp.status_string, "%s", "Stopped"); data/cccd-0.3beta4/cccd.c:936:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(disp.status_string, "%s", "No Status"); data/cccd-0.3beta4/cccd.c:939:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(disp.status_string, "%s", "Error"); data/cccd-0.3beta4/cccd.c:942:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(disp.status_string, "%s", "Ejected"); data/cccd-0.3beta4/cddb.c:257:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(subdirname, "%s/%s", path, dir_contents->d_name); data/cccd-0.3beta4/cddb.c:272:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%s/%s", subdirname, cd_id); data/cccd-0.3beta4/cddb.c:317:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%s/%s/%s", path, final_cat, cd_id); data/cccd-0.3beta4/cddb.c:481:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(row, "#\n# Revision: %d\n# Submitted via: %s %s\n#\n", data/cccd-0.3beta4/cddb.c:486:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(row, "DISCID=%s\n", cd->id); data/cccd-0.3beta4/cddb.c:492:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "DTITLE=%s\n", cd->title); data/cccd-0.3beta4/cddb.c:510:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "TTITLE%d=%s\n", (i - cd->first_track), cd->toc[i].title); data/cccd-0.3beta4/cddb.c:518:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(mark, "TTITLE%d=%s", (i - cd->first_track), tmp+CDDB_MAX_LINELEN-1); data/cccd-0.3beta4/cddb.c:576: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(row, tmp); data/cccd-0.3beta4/cddbp.c:85:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "cddb query %s %d ", disk_id, tracknum); data/cccd-0.3beta4/cddbp.c:89: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(buffer, tmp); data/cccd-0.3beta4/cddbp.c:93:3: [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(buffer, tmp); data/cccd-0.3beta4/cddbp.c:259:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "GET /%s?cmd=cddb+query+%s+%d", URL, cd_id, tracknum); data/cccd-0.3beta4/cddbp.c:263: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(buffer, tmp); data/cccd-0.3beta4/cddbp.c:267:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "+%d&hello=unknown+localhost+%s+%s&proto=1 HTTP/1.0\r\n\r\n", data/cccd-0.3beta4/cddbp.c:269:3: [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(buffer, tmp); data/cccd-0.3beta4/info.c:390:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(versionstring, data/cccd-0.3beta4/info.c:634:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%s/%s", final_cat, given_cd->id); data/cccd-0.3beta4/info.c:699:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(subject, " -s\"cddb %s %s\" ", final_cat, cd->id); data/cccd-0.3beta4/info.c:704:14: [4] (shell) popen: 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. stream = popen(command, "w"); data/cccd-0.3beta4/info.c:857:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(row, "%d %s", i + 1, title[i]); data/cccd-0.3beta4/misc.c:68:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(*active, "%s%s", *inactive, tmp); data/cccd-0.3beta4/misc.c:107:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(*active, "%s%s", *inactive, tmp); data/cccd-0.3beta4/misc.c:154:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(*dest, "%s%s", holder, appendage); data/cccd-0.3beta4/misc.c:184: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(*dest, src[i]); data/cccd-0.3beta4/misc.c:185: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(*dest, separator); data/cccd-0.3beta4/misc.c:187:3: [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(*dest, src[num - 1]); data/cccd-0.3beta4/misc.c:242:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(subdirname, "%s/%s", path, dir_contents->d_name); data/cccd-0.3beta4/options.c:87:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filepath, "%s/%s", getenv("HOME"), RCFILE); data/cccd-0.3beta4/options.c:214:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filepath, "%s/%s", getenv("HOME"), RCFILE); data/cccd-0.3beta4/cccd.c:654:7: [3] (random) srandom: 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. srandom(time(NULL)); data/cccd-0.3beta4/cccd.c:656:15: [3] (random) random: 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. next_track = random() % (cntl.cd.last_track - cntl.cd.first_track); data/cccd-0.3beta4/options.c:86:37: [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. filepath = (char *) malloc(strlen(getenv("HOME")) + strlen(RCFILE) + 2); data/cccd-0.3beta4/options.c:87:30: [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. sprintf(filepath, "%s/%s", getenv("HOME"), RCFILE); data/cccd-0.3beta4/options.c:213:37: [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. filepath = (char *) malloc(strlen(getenv("HOME")) + strlen(RCFILE) + 2); data/cccd-0.3beta4/options.c:214:30: [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. sprintf(filepath, "%s/%s", getenv("HOME"), RCFILE); data/cccd-0.3beta4/cccd.c:71:3: [2] (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). Risk is low because the source is a constant string. strcpy(cntl.devicename, "/dev/cdrom"); data/cccd-0.3beta4/cccd.c:406:3: [2] (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). Risk is low because the source is a constant string. strcpy(disp.mode_string, "Normal"); data/cccd-0.3beta4/cccd.c:703:5: [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. strcat(status_string, " Query"); data/cccd-0.3beta4/cccd.c:726:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(disp.time_string, "%02d:%02d", cdtime / 60, cdtime % 60); data/cccd-0.3beta4/cccd.c:730:5: [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. strcat(disp.time_string, " CD"); data/cccd-0.3beta4/cccd.c:733:5: [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. strcat(disp.time_string, " CD remain"); data/cccd-0.3beta4/cccd.c:736:5: [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. strcat(disp.time_string, " Track"); data/cccd-0.3beta4/cccd.c:739:5: [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. strcat(disp.time_string, " Track remain"); data/cccd-0.3beta4/cccd.c:756:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(track_string, "Track %d", cntl.cd.current_track); data/cccd-0.3beta4/cccd.c:909:5: [2] (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). Risk is low because the source is a constant string. strcpy(disp.mode_string, "Random"); data/cccd-0.3beta4/cccd.c:912:5: [2] (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). Risk is low because the source is a constant string. strcpy(disp.mode_string, "CD"); data/cccd-0.3beta4/cccd.c:915:5: [2] (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). Risk is low because the source is a constant string. strcpy(disp.mode_string, "Track"); data/cccd-0.3beta4/cccd.c:918:5: [2] (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). Risk is low because the source is a constant string. strcpy(disp.mode_string, "Normal"); data/cccd-0.3beta4/cccd.h:40: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 devicename[40]; data/cccd-0.3beta4/cd.c:119: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). handle = open(devicename, O_RDONLY); data/cccd-0.3beta4/cd.c:197:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cd->id, "%08lx", cddb_disk_id(cd->rlength, tracknum, offset)); data/cccd-0.3beta4/cddb.c:277: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). file = fopen(filename, "r"); data/cccd-0.3beta4/cddb.c:318: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). file = fopen(filename, "rt"); data/cccd-0.3beta4/cddb.c:472:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(row, "#\t%ld\n", cd->toc[i].offset); data/cccd-0.3beta4/cddb.c:477:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(row, "#\n# Disc length: %d seconds\n", cd->rlength); data/cccd-0.3beta4/cddb.c:503:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(row, "DTITLE=\n"); /* in case it's empty */ data/cccd-0.3beta4/cddb.c:527:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(row, "TTITLE%d=\n", (i - cd->first_track)); data/cccd-0.3beta4/cddb.c:535:7: [2] (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). Risk is low because the source is a constant string. strcpy(row, "EXTD="); data/cccd-0.3beta4/cddb.c:550:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(row, "EXTT%d=", i - cd->first_track); data/cccd-0.3beta4/cddb.c:558:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(row, "EXTT%d=\n", i - cd->first_track); data/cccd-0.3beta4/cddb.c:564:3: [2] (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). Risk is low because the source is a constant string. strcpy(row, "PLAYORDER="); data/cccd-0.3beta4/cddb.c:570:7: [2] (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). Risk is low because the source is a constant string. strcpy(row, "PLAYORDER="); data/cccd-0.3beta4/cddb.c:573:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%d", i - cd->first_track); data/cccd-0.3beta4/cddb.h:42:33: [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. enum errors remote_lookup(const char *cd_id, int tracknum, data/cccd-0.3beta4/cddbp.c:88:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%ld ", offset[i]); data/cccd-0.3beta4/cddbp.c:92:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%d\n", duration); data/cccd-0.3beta4/cddbp.c:262:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "+%ld", offset[i]); data/cccd-0.3beta4/cddbp.h:36:31: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. int cddbp_query(FILE *, const char *disk_id, int tracknum, data/cccd-0.3beta4/cddbp.h:44:22: [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. int http_query(const char *server, int port, const char *URL, data/cccd-0.3beta4/cddbp.h:44:52: [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. int http_query(const char *server, int port, const char *URL, data/cccd-0.3beta4/cddbp.h:45:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *disk_cd, int tracknum, long int offsets[tracknum], data/cccd-0.3beta4/info.c:52: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). if (info.open) /* only allow one info dialog to be open at a time */ data/cccd-0.3beta4/info.c:385: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 versionstring[256]; data/cccd-0.3beta4/info.c:418:15: [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). return info.open; data/cccd-0.3beta4/info.c:636: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). file = fopen(filename, "wt"); data/cccd-0.3beta4/info.c:723:25: [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 *track_string = (char *) malloc(4), *row[2]; data/cccd-0.3beta4/info.c:739:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(row[0], "%02d", track); data/cccd-0.3beta4/info.c:783:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(dud, "%d", tmp_opt.port); data/cccd-0.3beta4/info.c:856: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. row = (char *) malloc(strlen(title[i]) + 4); data/cccd-0.3beta4/info.h:30:23: [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). int selected_track, open, enter_pressed; data/cccd-0.3beta4/misc.c:208:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *) &socket_address.sin_addr, host->h_addr, host->h_length); data/cccd-0.3beta4/options.c:89: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). file = fopen(filepath, "rt"); data/cccd-0.3beta4/options.c:98:5: [2] (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). Risk is low because the source is a constant string. strcpy(o->server, "freedb.freedb.org"); data/cccd-0.3beta4/options.c:216: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). file = fopen(filepath, "wt"); data/cccd-0.3beta4/cccd.c:698: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). status_string = (char *) malloc(strlen(disp.status_string) + data/cccd-0.3beta4/cccd.c:699: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). strlen(disp.mode_string) + 7 + 2); data/cccd-0.3beta4/cccd.c:754:38: [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 ((disp.track_title == NULL) || (strlen(disp.track_title) <= 0)) { data/cccd-0.3beta4/cd.c:140:5: [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(300000); /* try every 1/3 seconds for max. 30 secs */ data/cccd-0.3beta4/cd.c:312:5: [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(40000); /* sleep for 3 frames[a 3/75 sec] */ data/cccd-0.3beta4/cddb.c:255:36: [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). subdirname = (char *) malloc(strlen(path) + data/cccd-0.3beta4/cddb.c:256: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(dir_contents->d_name) + 2); data/cccd-0.3beta4/cddb.c:271: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). filename = (char *) malloc(strlen(subdirname) + strlen(cd_id) + 2); data/cccd-0.3beta4/cddb.c:271: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). filename = (char *) malloc(strlen(subdirname) + strlen(cd_id) + 2); data/cccd-0.3beta4/cddb.c:290:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(title[subdir_num], mark, i); data/cccd-0.3beta4/cddb.c:316: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). filename = (char *) malloc(strlen(path) + 1 + strlen(final_cat) + 1 + strlen(cd_id) + 1); data/cccd-0.3beta4/cddb.c:316: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). filename = (char *) malloc(strlen(path) + 1 + strlen(final_cat) + 1 + strlen(cd_id) + 1); data/cccd-0.3beta4/cddb.c:316:73: [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). filename = (char *) malloc(strlen(path) + 1 + strlen(final_cat) + 1 + strlen(cd_id) + 1); data/cccd-0.3beta4/cddb.c:353:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(row, tmp, i); data/cccd-0.3beta4/cddb.c:491: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). tmp = (char *) malloc(strlen(cd->title) + strlen("DTITLE=\n") + 1); data/cccd-0.3beta4/cddb.c:491:47: [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). tmp = (char *) malloc(strlen(cd->title) + strlen("DTITLE=\n") + 1); data/cccd-0.3beta4/cddb.c:493:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(row, tmp, CDDB_MAX_LINELEN); data/cccd-0.3beta4/cddb.c:494: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(tmp) < CDDB_MAX_LINELEN) data/cccd-0.3beta4/cddb.c:495: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). row[strlen(tmp)] = 0; data/cccd-0.3beta4/cddb.c:509: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). tmp = (char *) malloc(strlen(cd->toc[i].title) + strlen("TTITLE99=\n") + 1); data/cccd-0.3beta4/cddb.c:509: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). tmp = (char *) malloc(strlen(cd->toc[i].title) + strlen("TTITLE99=\n") + 1); data/cccd-0.3beta4/cddb.c:512:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(row, tmp, CDDB_MAX_LINELEN); data/cccd-0.3beta4/cddb.c:513: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(tmp) >= CDDB_MAX_LINELEN) { data/cccd-0.3beta4/cddb.c:517: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). mark = (char *) malloc(strlen(cd->toc[i].title) + strlen("TTITLE99=\n") + 1); data/cccd-0.3beta4/cddb.c:517: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). mark = (char *) malloc(strlen(cd->toc[i].title) + strlen("TTITLE99=\n") + 1); data/cccd-0.3beta4/cddb.c:519:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(row, mark, CDDB_MAX_LINELEN); data/cccd-0.3beta4/cddb.c:520: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). row[(strlen(mark) < CDDB_MAX_LINELEN) ? strlen(mark) : CDDB_MAX_LINELEN] = 0; data/cccd-0.3beta4/cddb.c:520:42: [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). row[(strlen(mark) < CDDB_MAX_LINELEN) ? strlen(mark) : CDDB_MAX_LINELEN] = 0; data/cccd-0.3beta4/cddb.c:523: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). else row[strlen(tmp)] = 0; data/cccd-0.3beta4/cddb.c:536:7: [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. strncat(row, tmp, 80 - strlen("EXTD=\n")); data/cccd-0.3beta4/cddb.c:536: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). strncat(row, tmp, 80 - strlen("EXTD=\n")); data/cccd-0.3beta4/cddb.c:537:7: [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(row, "\n"); data/cccd-0.3beta4/cddb.c:539: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). tmp += strlen(row) - strlen("EXTD=\n"); data/cccd-0.3beta4/cddb.c:539:28: [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). tmp += strlen(row) - strlen("EXTD=\n"); data/cccd-0.3beta4/cddb.c:551: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. strncat(row, tmp, 80 - strlen("EXTT99=\n")); data/cccd-0.3beta4/cddb.c:551:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(row, tmp, 80 - strlen("EXTT99=\n")); data/cccd-0.3beta4/cddb.c:552:2: [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(row, "\n"); data/cccd-0.3beta4/cddb.c:554: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). tmp += strlen(row) - strlen("EXTT99=\n"); data/cccd-0.3beta4/cddb.c:554:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tmp += strlen(row) - strlen("EXTT99=\n"); data/cccd-0.3beta4/cddb.c:567: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(row) > 75) { /* only 80 char/row allowed. check for overflow */ data/cccd-0.3beta4/cddb.c:568:7: [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(row, "\n"); data/cccd-0.3beta4/cddb.c:575:2: [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(tmp, ","); data/cccd-0.3beta4/cddb.c:652:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(category[*cat_num], tmp, size); data/cccd-0.3beta4/cddbp.c:82:28: [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). buffer = (char *) malloc(strlen("cddb query ") + strlen(disk_id) + 1 + 3 + data/cccd-0.3beta4/cddbp.c:82:52: [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). buffer = (char *) malloc(strlen("cddb query ") + strlen(disk_id) + 1 + 3 + data/cccd-0.3beta4/cddbp.c:140:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((*category_buffer)[*matches], buffer, i); data/cccd-0.3beta4/cddbp.c:146:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((*id_buffer)[*matches], buffer, 8); data/cccd-0.3beta4/cddbp.c:150: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). i = strlen(buffer) - 2; /*strip the remaining '\r\n' from the data/cccd-0.3beta4/cddbp.c:153:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((*title_buffer)[*matches], buffer, i); data/cccd-0.3beta4/cddbp.c:191:3: [1] (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). Risk is low because the source is a constant character. strcpy(*result_buffer, ""); data/cccd-0.3beta4/cddbp.c:264:5: [1] (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). Risk is low because the source is a constant character. strcpy(tmp, ""); data/cccd-0.3beta4/cddbp.c:327:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((*category_buffer)[*matches], buffer, i); data/cccd-0.3beta4/cddbp.c:333:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((*id_buffer)[*matches], buffer, 8); data/cccd-0.3beta4/cddbp.c:339:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((*title_buffer)[*matches], buffer, i); data/cccd-0.3beta4/info.c:633: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). filename = (char *) malloc(strlen(final_cat) + 8 + 2); data/cccd-0.3beta4/info.c:654: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). if (given_cd->title == NULL || strlen(given_cd->title) < 1 || data/cccd-0.3beta4/info.c:659: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 (given_cd->toc[i].title != NULL && strlen(given_cd->toc[i].title) > 0) { data/cccd-0.3beta4/info.c:677: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). if ((opt->remote_submit == NULL) || (strlen(opt->remote_submit) < 1)) { data/cccd-0.3beta4/info.c:698:31: [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). subject = (char *) malloc(strlen(final_cat) + strlen(cd->id) + 20); data/cccd-0.3beta4/info.c:698: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). subject = (char *) malloc(strlen(final_cat) + strlen(cd->id) + 20); data/cccd-0.3beta4/info.c:856: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). row = (char *) malloc(strlen(title[i]) + 4); data/cccd-0.3beta4/misc.c:46:3: [1] (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). Risk is low because the source is a constant character. strcpy(buffer1, ""); data/cccd-0.3beta4/misc.c:47:3: [1] (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). Risk is low because the source is a constant character. strcpy(buffer2, ""); data/cccd-0.3beta4/misc.c:48:3: [1] (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). Risk is low because the source is a constant character. strcpy(tmp, ""); data/cccd-0.3beta4/misc.c:86:3: [1] (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). Risk is low because the source is a constant character. strcpy(buffer1, ""); data/cccd-0.3beta4/misc.c:87:3: [1] (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). Risk is low because the source is a constant character. strcpy(buffer2, ""); data/cccd-0.3beta4/misc.c:88:3: [1] (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). Risk is low because the source is a constant character. strcpy(tmp, ""); data/cccd-0.3beta4/misc.c:113: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). int i = strlen(*string) - 1; data/cccd-0.3beta4/misc.c:122:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(return_string, *string, i); data/cccd-0.3beta4/misc.c:153: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). *dest = (char *) malloc(strlen(holder) + strlen(appendage) + 1); data/cccd-0.3beta4/misc.c:153: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). *dest = (char *) malloc(strlen(holder) + strlen(appendage) + 1); data/cccd-0.3beta4/misc.c:173: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). sep_size = strlen(separator); data/cccd-0.3beta4/misc.c:176: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). size += strlen(src[i]) + sep_size; data/cccd-0.3beta4/misc.c:181:3: [1] (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). Risk is low because the source is a constant character. strcpy(*dest, ""); data/cccd-0.3beta4/misc.c:241:36: [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). subdirname = (char *) malloc(strlen(path) + strlen(dir_contents->d_name) + 2); data/cccd-0.3beta4/misc.c:241: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). subdirname = (char *) malloc(strlen(path) + strlen(dir_contents->d_name) + 2); data/cccd-0.3beta4/options.c:86: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). filepath = (char *) malloc(strlen(getenv("HOME")) + strlen(RCFILE) + 2); data/cccd-0.3beta4/options.c:86: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). filepath = (char *) malloc(strlen(getenv("HOME")) + strlen(RCFILE) + 2); data/cccd-0.3beta4/options.c:97: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). o->server = (char *) malloc(strlen("freedb.freedb.org") + 1); data/cccd-0.3beta4/options.c:213: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). filepath = (char *) malloc(strlen(getenv("HOME")) + strlen(RCFILE) + 2); data/cccd-0.3beta4/options.c:213: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). filepath = (char *) malloc(strlen(getenv("HOME")) + strlen(RCFILE) + 2); ANALYSIS SUMMARY: Hits = 173 Lines analyzed = 4782 in approximately 0.16 seconds (29354 lines/second) Physical Source Lines of Code (SLOC) = 3418 Hits@level = [0] 70 [1] 81 [2] 49 [3] 6 [4] 37 [5] 0 Hits@level+ = [0+] 243 [1+] 173 [2+] 92 [3+] 43 [4+] 37 [5+] 0 Hits/KSLOC@level+ = [0+] 71.0942 [1+] 50.6144 [2+] 26.9163 [3+] 12.5805 [4+] 10.825 [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.