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/ebook-speaker-5.5.2/src/ncx.c Examining data/ebook-speaker-5.5.2/src/opf.c Examining data/ebook-speaker-5.5.2/src/daisy2.02.c Examining data/ebook-speaker-5.5.2/src/daisy.h Examining data/ebook-speaker-5.5.2/src/common.c Examining data/ebook-speaker-5.5.2/src/playfile.c Examining data/ebook-speaker-5.5.2/src/list_dir.c Examining data/ebook-speaker-5.5.2/src/daisy3.c Examining data/ebook-speaker-5.5.2/src/pactl/src/strbuf.h Examining data/ebook-speaker-5.5.2/src/pactl/src/strlist.h Examining data/ebook-speaker-5.5.2/src/pactl/src/i18n.h Examining data/ebook-speaker-5.5.2/src/pactl/src/core-util.c Examining data/ebook-speaker-5.5.2/src/pactl/src/core-util.h Examining data/ebook-speaker-5.5.2/src/pactl/src/core-error.h Examining data/ebook-speaker-5.5.2/src/pactl/src/pactl-set-cmd.c Examining data/ebook-speaker-5.5.2/src/pactl/src/socket.h Examining data/ebook-speaker-5.5.2/src/pactl/src/strbuf.c Examining data/ebook-speaker-5.5.2/src/pactl/src/macro.h Examining data/ebook-speaker-5.5.2/src/pactl/src/pactl.c Examining data/ebook-speaker-5.5.2/src/ebook-speaker.c FINAL RESULTS: data/ebook-speaker-5.5.2/src/ebook-speaker.c:1443:4: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat (str, "/out.txt", MAX_STR); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1957:4: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat (str, "/out.epub", MAX_STR); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2165:4: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat (s2, "/", MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2166:4: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat (s2, str, MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2167:4: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat (s2, ".wav", MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2169:7: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat (s2, ".wav", MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2229:4: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat (s2, "/", MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2230:4: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat (s2, str, MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2231:4: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat (s2, ".txt", MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2233:7: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat (s2, ".txt", MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2298:4: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat (str, "/", MAX_STR); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2299:4: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat (str, basename (file), MAX_STR); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2300:4: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat (str, ".xml", MAX_STR); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2962:13: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat (misc.orig_input_file, "/", MAX_STR); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2963:10: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat (misc.orig_input_file, argv[optind], MAX_STR - 1); data/ebook-speaker-5.5.2/src/list_dir.c:292:16: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat (misc->src_dir, "/", MAX_STR); data/ebook-speaker-5.5.2/src/list_dir.c:341:13: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat (misc->src_dir, "/", MAX_STR); data/ebook-speaker-5.5.2/src/common.c:27:8: [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 (xml_file, R_OK) == -1) data/ebook-speaker-5.5.2/src/common.c:107:12: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system ("reset")); data/ebook-speaker-5.5.2/src/common.c:138:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (path, "%s/%s", dir, namelist[n]->d_name); data/ebook-speaker-5.5.2/src/common.c:140:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (path, "%s/%s", dir, namelist[n]->d_name); data/ebook-speaker-5.5.2/src/common.c:143:10: [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 (found, path); data/ebook-speaker-5.5.2/src/common.c:158:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (new_dir, "%s/%s", dir, namelist[n]->d_name); data/ebook-speaker-5.5.2/src/common.c:160:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (new_dir, "%s/%s", dir, namelist[n]->d_name); data/ebook-speaker-5.5.2/src/common.c:188:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (found, "%s/%s\n", dir_name, entry->d_name); data/ebook-speaker-5.5.2/src/common.c:201:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (path, "%s/%s", dir_name, entry->d_name); data/ebook-speaker-5.5.2/src/common.c:203:10: [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 (found, get_dir_content (misc, path, search_str)); data/ebook-speaker-5.5.2/src/common.c:221:4: [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 (misc->ncx_name, data/ebook-speaker-5.5.2/src/common.c:224:4: [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 (misc->opf_name, data/ebook-speaker-5.5.2/src/common.c:336:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (misc->ncc_html, "%s/ncc.html", misc->daisy_mp); data/ebook-speaker-5.5.2/src/common.c:365:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "%s/%s", misc->daisy_mp, namelist[n]->d_name); data/ebook-speaker-5.5.2/src/common.c:551:8: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (system (misc->cmd) != 0) data/ebook-speaker-5.5.2/src/common.c:558:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "%s: %s\n", misc->cmd, strerror (e)); data/ebook-speaker-5.5.2/src/common.c:571:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (my_attribute->class, "%s", attr); data/ebook-speaker-5.5.2/src/common.c:916:35: [4] (misc) cuserid: Exactly what cuserid() does is poorly defined (e.g., some systems use the effective uid, like Linux, while others like System V use the real uid). Thus, you can't trust what it does. It's certainly not portable (The cuserid function was included in the 1988 version of POSIX, but removed from the 1990 version). Also, if passed a non-null parameter, there's a risk of a buffer overflow if the passed-in buffer is not at least L_cuserid characters long (CWE-120). Use getpwuid(geteuid()) and extract the desired information instead. if (strcmp (grp->gr_mem[n], cuserid (NULL)) == 0) data/ebook-speaker-5.5.2/src/common.c:938:13: [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. if ((p = popen ("LANG=C /usr/bin/pactl list sinks", "r")) == NULL) data/ebook-speaker-5.5.2/src/common.c:977:35: [4] (misc) cuserid: Exactly what cuserid() does is poorly defined (e.g., some systems use the effective uid, like Linux, while others like System V use the real uid). Thus, you can't trust what it does. It's certainly not portable (The cuserid function was included in the 1988 version of POSIX, but removed from the 1990 version). Also, if passed a non-null parameter, there's a risk of a buffer overflow if the passed-in buffer is not at least L_cuserid characters long (CWE-120). Use getpwuid(geteuid()) and extract the desired information instead. if (strcmp (grp->gr_mem[n], cuserid (NULL)) == 0) data/ebook-speaker-5.5.2/src/common.c:1007:16: [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. if ((p = popen ("LANGUAGE=C /usr/bin/pactl list sinks", "r")) == NULL) data/ebook-speaker-5.5.2/src/common.c:1059:13: [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 (sink_info[n] + 53, strcasestr (str, "Mute:")); data/ebook-speaker-5.5.2/src/common.c:1070:13: [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 (sink_info[n] + 63, strstr (str, "Volume:")); data/ebook-speaker-5.5.2/src/common.c:1079:13: [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 (sink_info[n], str + x); data/ebook-speaker-5.5.2/src/ebook-speaker.c:28:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (misc->cmd)); data/ebook-speaker-5.5.2/src/ebook-speaker.c:36:12: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system ("reset")); data/ebook-speaker-5.5.2/src/ebook-speaker.c:130:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "fopen (%s)", misc->eBook_speaker_txt); data/ebook-speaker-5.5.2/src/ebook-speaker.c:147:12: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (misc->tts[misc->tts_no])); data/ebook-speaker-5.5.2/src/ebook-speaker.c:187:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "%s/.eBook-speaker/%s", pw->pw_dir, misc->bookmark_title); data/ebook-speaker-5.5.2/src/ebook-speaker.c:205:10: [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 (file, get_input_file (misc, my_attribute, data/ebook-speaker-5.5.2/src/ebook-speaker.c:414:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (new, "%s.%03d.splitted.xhtml", daisy[i].xml_file, i); data/ebook-speaker-5.5.2/src/ebook-speaker.c:422:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "fopen (%s): %s\n", new, strerror (e)); data/ebook-speaker-5.5.2/src/ebook-speaker.c:576:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "%s/.eBook-speaker", pw->pw_dir); data/ebook-speaker-5.5.2/src/ebook-speaker.c:580:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "%s/.eBook-speaker/%s", pw->pw_dir, misc->bookmark_title); data/ebook-speaker-5.5.2/src/ebook-speaker.c:628:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "%s/.eBook-speaker/%s", pw->pw_dir, misc->bookmark_title); data/ebook-speaker-5.5.2/src/ebook-speaker.c:797:12: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (misc->tts[misc->tts_no])); data/ebook-speaker-5.5.2/src/ebook-speaker.c:801:11: [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 (misc->tmp_wav, R_OK) == 0) data/ebook-speaker-5.5.2/src/ebook-speaker.c:813:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "sox_open_read: %s: %s", data/ebook-speaker-5.5.2/src/ebook-speaker.c:826:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (first_eBook_speaker_wav, "%s/first_eBook_speaker.wav", data/ebook-speaker-5.5.2/src/ebook-speaker.c:853:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (misc->tts[misc->tts_no])); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1408:12: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (misc->cmd)) data/ebook-speaker-5.5.2/src/ebook-speaker.c:1424:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (misc->str, data/ebook-speaker-5.5.2/src/ebook-speaker.c:1470: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 (misc->tts[misc->tts_no], misc->option_t); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1670:18: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (misc->cmd)); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1683:18: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (misc->cmd)) data/ebook-speaker-5.5.2/src/ebook-speaker.c:1876:10: [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 (file, data/ebook-speaker-5.5.2/src/ebook-speaker.c:1921:12: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (misc->cmd)) data/ebook-speaker-5.5.2/src/ebook-speaker.c:1938:12: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (misc->cmd)) data/ebook-speaker-5.5.2/src/ebook-speaker.c:1958:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (misc->cmd, data/ebook-speaker-5.5.2/src/ebook-speaker.c:1961:12: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (misc->cmd)) data/ebook-speaker-5.5.2/src/ebook-speaker.c:1976:8: [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 (str, R_OK) == -1) data/ebook-speaker-5.5.2/src/ebook-speaker.c:1991:12: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (misc->cmd)) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2017:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (txt_file, "%s.txt", daisy[i].xml_file); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2019:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (misc->cmd, "/usr/bin/fold -s -w %d %s", misc->break_phrase, data/ebook-speaker-5.5.2/src/ebook-speaker.c:2022:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (folded_file, "%s.folded", txt_file); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2023:8: [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. p = popen (misc->cmd, "r"); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2063:11: [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 (daisy[i].xml_file, R_OK) == -1) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2168:11: [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. while (access (s2, F_OK) == 0) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2232:11: [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. while (access (s2, F_OK) == 0) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2275:12: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (cmd)) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2338:8: [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 (misc->ncc_html, R_OK) == 0) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2431:4: [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 (misc->daisy_mp, misc->tmp_dir); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2475:11: [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. p = popen (misc->cmd, "r"); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2480:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (file, "%s%s", misc->tmp_dir, str); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2492:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (file, "%s/out.html", misc->tmp_dir); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2493:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (misc->cmd)) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2536:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (cmd)) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2554:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "%s/out.UTF-8", misc->tmp_dir); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2558:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (misc->cmd)) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2590:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (cmd)) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2647:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "%s/eBook-speaker", misc->tmp_dir); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2648:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (misc->cmd, data/ebook-speaker-5.5.2/src/ebook-speaker.c:2650:18: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (misc->cmd)) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2841:10: [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 (misc.option_t, optarg); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2888:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (cmd, "scanimage --resolution %s --mode binary > %s", data/ebook-speaker-5.5.2/src/ebook-speaker.c:2890:15: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (cmd)) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2940:18: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. switch (system (misc.cmd)) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2967:8: [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 (misc.orig_input_file, R_OK) == -1) data/ebook-speaker-5.5.2/src/list_dir.c:222: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 (misc->src_dir, src); data/ebook-speaker-5.5.2/src/list_dir.c:302:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (src, "%s%s", misc->src_dir, namelist[n]->d_name); data/ebook-speaker-5.5.2/src/list_dir.c:308:13: [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 (misc->src_dir, src); data/ebook-speaker-5.5.2/src/list_dir.c:319:10: [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 (file, misc->src_dir); data/ebook-speaker-5.5.2/src/list_dir.c:322:10: [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 (file, namelist[n]->d_name); data/ebook-speaker-5.5.2/src/list_dir.c:339:10: [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 (misc->src_dir, dirname (dirc)); data/ebook-speaker-5.5.2/src/list_dir.c:427:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "%s%s", misc->src_dir, namelist[n]->d_name); data/ebook-speaker-5.5.2/src/opf.c:338:13: [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 (misc->daisy_title, misc->label); data/ebook-speaker-5.5.2/src/pactl/src/core-util.c:309:11: [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. ret = vsnprintf(str, size, format, ap); data/ebook-speaker-5.5.2/src/pactl/src/pactl.c:170:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, _("%s"), data/ebook-speaker-5.5.2/src/pactl/src/pactl.c:189:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (sink_info[i->index] + 52, " Muted: %3s Volume:%s", data/ebook-speaker-5.5.2/src/pactl/src/strbuf.c:171:13: [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. r = vsnprintf(CHUNK_TO_TEXT(c), size, format, ap); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2789:18: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt (argc, argv, "b:cd:hHilo:r:sSt:vNO")) != -1) data/ebook-speaker-5.5.2/src/pactl/src/core-util.c:436: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. e = getenv("XDG_SESSION_ID"); data/ebook-speaker-5.5.2/src/pactl/src/core-util.c:562:19: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (!(r = realpath(path, NULL))) data/ebook-speaker-5.5.2/src/pactl/src/core-util.c:575:19: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (!(t = realpath(path, path_buf))) { data/ebook-speaker-5.5.2/src/common.c:22:1: [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 sink_info[10][100]; data/ebook-speaker-5.5.2/src/common.c:43: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 str[MAX_STR]; data/ebook-speaker-5.5.2/src/common.c:52: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 str[MAX_STR]; data/ebook-speaker-5.5.2/src/common.c:80: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. char hex[10]; data/ebook-speaker-5.5.2/src/common.c:566:4: [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 attr[MAX_STR - 1]; data/ebook-speaker-5.5.2/src/common.c:582:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->break_phrase = atoi (attr); data/ebook-speaker-5.5.2/src/common.c:608:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->current = atoi (attr); data/ebook-speaker-5.5.2/src/common.c:612:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->level = atoi ((char *) attr); data/ebook-speaker-5.5.2/src/common.c:621: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 name[MAX_STR], content[MAX_STR]; data/ebook-speaker-5.5.2/src/common.c:647:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->total_pages = atoi (content); data/ebook-speaker-5.5.2/src/common.c:653:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->total_pages = atoi (content); data/ebook-speaker-5.5.2/src/common.c:655:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->total_pages = atoi (content); data/ebook-speaker-5.5.2/src/common.c:657:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->total_pages = atoi (content); data/ebook-speaker-5.5.2/src/common.c:673:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->phrase_nr = atoi ((char *) attr); data/ebook-speaker-5.5.2/src/common.c:682:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->pulseaudio_device = atoi (attr); data/ebook-speaker-5.5.2/src/common.c:767: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 str[MAX_STR]; data/ebook-speaker-5.5.2/src/common.c:825:4: [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 pn[15]; data/ebook-speaker-5.5.2/src/common.c:840:8: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (atoi (pn) == 0 || atoi (pn) > misc->total_pages) data/ebook-speaker-5.5.2/src/common.c:840:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (atoi (pn) == 0 || atoi (pn) > misc->total_pages) data/ebook-speaker-5.5.2/src/common.c:860:47: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (daisy[misc->current].page_number == atoi (pn)) data/ebook-speaker-5.5.2/src/common.c:874:46: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (daisy[misc->playing].page_number < atoi (pn)) data/ebook-speaker-5.5.2/src/common.c:883:40: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (misc->current_page_number == atoi (pn)) data/ebook-speaker-5.5.2/src/common.c:891:39: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (misc->current_page_number > atoi (pn)) data/ebook-speaker-5.5.2/src/common.c:958:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (atoi (str) == misc->pulseaudio_device) data/ebook-speaker-5.5.2/src/common.c:1033:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). atoi (sink_info[n]) == misc->pulseaudio_device) data/ebook-speaker-5.5.2/src/common.c:1054:13: [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 (sink_info[n] + 4, str, len); data/ebook-speaker-5.5.2/src/common.c:1101:36: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->pulseaudio_device = atoi (sink_info[current_sink]); data/ebook-speaker-5.5.2/src/common.c:1116:13: [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 dev[5]; data/ebook-speaker-5.5.2/src/common.c:1119:13: [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 (dev, "%d", atoi (sink_info[current_sink])); data/ebook-speaker-5.5.2/src/common.c:1119:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). sprintf (dev, "%d", atoi (sink_info[current_sink])); data/ebook-speaker-5.5.2/src/common.c:1133:13: [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 dev[5]; data/ebook-speaker-5.5.2/src/common.c:1136:13: [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 (dev, "%d", atoi (sink_info[current_sink])); data/ebook-speaker-5.5.2/src/common.c:1136:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). sprintf (dev, "%d", atoi (sink_info[current_sink])); data/ebook-speaker-5.5.2/src/common.c:1145:13: [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 dev[5]; data/ebook-speaker-5.5.2/src/common.c:1148:13: [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 (dev, "%d", atoi (sink_info[current_sink])); data/ebook-speaker-5.5.2/src/common.c:1148:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). sprintf (dev, "%d", atoi (sink_info[current_sink])); data/ebook-speaker-5.5.2/src/daisy.h:66:4: [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 class[MAX_STR], data/ebook-speaker-5.5.2/src/daisy.h:106:4: [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 ncc_html[MAX_STR], ncc_totalTime[MAX_STR]; data/ebook-speaker-5.5.2/src/daisy.h:107:4: [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 daisy_version[MAX_STR], daisy_title[MAX_STR], daisy_language[MAX_STR]; data/ebook-speaker-5.5.2/src/daisy.h:108:4: [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 tag[MAX_TAG], *label, ocr_language[5]; data/ebook-speaker-5.5.2/src/daisy.h:109:4: [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 bookmark_title[MAX_STR]; data/ebook-speaker-5.5.2/src/daisy.h:110:4: [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 cd_dev[MAX_STR], tts[15][MAX_STR]; data/ebook-speaker-5.5.2/src/daisy.h:111:4: [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 option_t[MAX_STR]; data/ebook-speaker-5.5.2/src/daisy.h:112:4: [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 opf_name[MAX_STR], ncx_name[MAX_STR], copyright[MAX_STR], option_d[5]; data/ebook-speaker-5.5.2/src/daisy.h:113:4: [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 eBook_speaker_txt[MAX_STR + 1], tmp_wav[MAX_STR + 1]; data/ebook-speaker-5.5.2/src/daisy.h:114:4: [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 cmd[MAX_CMD + 1], str[MAX_STR + 1]; data/ebook-speaker-5.5.2/src/daisy.h:116:4: [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 orig_input_file[MAX_STR], search_str[30]; data/ebook-speaker-5.5.2/src/daisy.h:117:4: [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 locale[25], xmlversion[MAX_STR + 1], encoding[MAX_STR + 1]; data/ebook-speaker-5.5.2/src/daisy.h:118:4: [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 standalone[MAX_STR + 1], scan_resolution[10]; data/ebook-speaker-5.5.2/src/daisy.h:129:4: [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 class[MAX_STR], my_class[MAX_STR]; data/ebook-speaker-5.5.2/src/daisy.h:130:4: [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 label[100]; data/ebook-speaker-5.5.2/src/daisy.h:131:4: [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 first_id[MAX_STR], last_id[MAX_STR]; data/ebook-speaker-5.5.2/src/daisy2.02.c:46: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 str[MAX_STR]; data/ebook-speaker-5.5.2/src/daisy2.02.c:76:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (*misc->label && atoi (misc->label) != 0) data/ebook-speaker-5.5.2/src/daisy2.02.c:79:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->current_page_number = atoi (misc->label); data/ebook-speaker-5.5.2/src/daisy2.02.c:90:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->current_page_number = atoi (misc->label); data/ebook-speaker-5.5.2/src/daisy2.02.c:126: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. char str[MAX_STR]; data/ebook-speaker-5.5.2/src/daisy2.02.c:254:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). daisy[i].page_number = atoi (misc->label); data/ebook-speaker-5.5.2/src/daisy3.c:76:44: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->current_page_number = atoi (misc->label); data/ebook-speaker-5.5.2/src/daisy3.c:91:44: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->current_page_number = atoi (misc->label); data/ebook-speaker-5.5.2/src/daisy3.c:99:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->current_page_number = atoi (misc->label); data/ebook-speaker-5.5.2/src/daisy3.c:182:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->current_page_number = atoi (misc->label); data/ebook-speaker-5.5.2/src/daisy3.c:235:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->current_page_number = atoi (misc->label); data/ebook-speaker-5.5.2/src/ebook-speaker.c:50:4: [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 temp[12][MAX_STR]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:125:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((w = fopen (misc->eBook_speaker_txt, "w")) == NULL) data/ebook-speaker-5.5.2/src/ebook-speaker.c:162: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 tempo_str[10], dev[5]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:166: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 (dev, "%d", misc->pulseaudio_device); data/ebook-speaker-5.5.2/src/ebook-speaker.c:195: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. char file[MAX_STR]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:305: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 str[MAX_STR]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:785:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((w = fopen (misc->eBook_speaker_txt, "w")) == NULL) data/ebook-speaker-5.5.2/src/ebook-speaker.c:790: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 str[MAX_STR]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:850:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). w = fopen (misc->eBook_speaker_txt, "w"); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1024:4: [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 str[MAX_STR], *p; data/ebook-speaker-5.5.2/src/ebook-speaker.c:1075: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. char str[MAX_STR]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:1249:4: [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 pos[5]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:1268:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->break_phrase = atoi (pos); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1326:4: [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 str[MAX_STR + 1]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:1465:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc->pulseaudio_device = atoi (misc->option_d); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1547: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. char pn[15]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:1562:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (! *pn || atoi (pn) >= daisy[misc->current].n_phrases) data/ebook-speaker-5.5.2/src/ebook-speaker.c:1569:67: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). go_to_phrase (misc, my_attribute, daisy, misc->current , atoi (pn)); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1626:13: [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 dev[5]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:1629:13: [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 (dev, "%d", misc->pulseaudio_device); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1654: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. char str[MAX_STR]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:1706:10: [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 (misc->daisy_title, "scanned image"); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1848:13: [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 dev[5]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:1851:13: [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 (dev, "%d", misc->pulseaudio_device); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1860:13: [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 dev[5]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:1863:13: [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 (dev, "%d", misc->pulseaudio_device); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1954:4: [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 str[MAX_STR + 1]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:1979: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 str[MAX_STR]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:2024: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). w = fopen (folded_file, "w"); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2118:13: [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 (daisy[j].label, "%d", j + 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2141:10: [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 (daisy[i].label, "%d", i + 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2149:4: [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 *str, s2[MAX_STR]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:2183:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((w = fopen (outfile, "w")) == NULL) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2209:4: [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 *str, s2[MAX_STR]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:2234: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). if (fopen (s2, "w") == NULL) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2268:4: [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 cmd[MAX_CMD]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:2291:11: [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. static char str[MAX_STR + 1]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:2295:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (! (r = fopen (file , "r"))) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2301:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (! (w = fopen (str, "w"))) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2347: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. char str[MAX_STR]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:2390: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 (misc->daisy_title, "scanned image"); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2467: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 str[MAX_STR], *orig; data/ebook-speaker-5.5.2/src/ebook-speaker.c:2533: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 cmd[MAX_CMD + 1]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:2586: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 cmd[MAX_CMD + 1]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:2643: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 str[MAX_STR + 1]; data/ebook-speaker-5.5.2/src/ebook-speaker.c:2721: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 (misc.locale, "en_US.UTF-8"); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2753:4: [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 (misc.scan_resolution, "400"); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2776:27: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). if ((misc.tmp_wav_fd = mkstemp (misc.tmp_wav)) == 01) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2799:49: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc.break_phrase = misc.option_b = atoi (optarg); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2805:35: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). misc.pulseaudio_device = atoi (optarg); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2806:10: [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 (misc.option_d, "%d", misc.pulseaudio_device); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2907: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 (misc.daisy_title, "scanned image"); data/ebook-speaker-5.5.2/src/list_dir.c:58:4: [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 (str, "%d/%d", (int) page, (int) (misc->list_total - 1) / 23 + 1); data/ebook-speaker-5.5.2/src/list_dir.c:211:4: [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 *file, search_str[MAX_STR], str[MAX_STR + 1]; data/ebook-speaker-5.5.2/src/list_dir.c:328: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. char name[MAX_STR + 1], *basec, *dirc; data/ebook-speaker-5.5.2/src/opf.c:83:13: [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 (daisy[i].label, "%d", i + 1); data/ebook-speaker-5.5.2/src/pactl/src/core-util.c:61: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(b, s, k); data/ebook-speaker-5.5.2/src/pactl/src/core-util.c:102: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 str[64]; data/ebook-speaker-5.5.2/src/pactl/src/core-util.c:112: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(str, v, (size_t) len + 1); data/ebook-speaker-5.5.2/src/pactl/src/pactl-set-cmd.c:13:1: [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 sink_info[10][100]; data/ebook-speaker-5.5.2/src/pactl/src/pactl-set-cmd.c:18:4: [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 sink_info[10][100]; data/ebook-speaker-5.5.2/src/pactl/src/pactl-set-cmd.c:26: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 (sink_info, pactl (argv[1], argv[2], argv[3]), 1000); data/ebook-speaker-5.5.2/src/pactl/src/pactl.c:45:8: [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. extern char sink_info[10][100]; data/ebook-speaker-5.5.2/src/pactl/src/pactl.c:143: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 data/ebook-speaker-5.5.2/src/pactl/src/strbuf.c:81:9: [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(e, CHUNK_TO_TEXT(c), c->length); data/ebook-speaker-5.5.2/src/pactl/src/strbuf.c:150: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(CHUNK_TO_TEXT(c), t, l); data/ebook-speaker-5.5.2/src/playfile.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 *args[10]; data/ebook-speaker-5.5.2/src/common.c:76:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = 0; i < (int) strlen (file) - 2; i++) data/ebook-speaker-5.5.2/src/common.c:136:22: [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). path = malloc (strlen (dir) + strlen (namelist[n]->d_name) + 2); data/ebook-speaker-5.5.2/src/common.c:136:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). path = malloc (strlen (dir) + strlen (namelist[n]->d_name) + 2); data/ebook-speaker-5.5.2/src/common.c:137: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). if (dir[strlen (dir) - 1] == '/') data/ebook-speaker-5.5.2/src/common.c:156: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). new_dir = malloc (strlen (dir) + strlen (namelist[n]->d_name) + 2); data/ebook-speaker-5.5.2/src/common.c:156: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). new_dir = malloc (strlen (dir) + strlen (namelist[n]->d_name) + 2); data/ebook-speaker-5.5.2/src/common.c:157: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). if (dir[strlen (dir) - 1] != '/') data/ebook-speaker-5.5.2/src/common.c:187:26: [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). found = malloc (strlen (dir_name) + strlen (entry->d_name) + 5); data/ebook-speaker-5.5.2/src/common.c:187: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). found = malloc (strlen (dir_name) + strlen (entry->d_name) + 5); data/ebook-speaker-5.5.2/src/common.c:189: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). found[strlen (found) - 1] = 0; data/ebook-speaker-5.5.2/src/common.c:200: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). path = malloc (strlen (dir_name) + strlen (entry->d_name) + 10); data/ebook-speaker-5.5.2/src/common.c:200:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). path = malloc (strlen (dir_name) + strlen (entry->d_name) + 10); data/ebook-speaker-5.5.2/src/common.c:265:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy (misc->daisy_version, "2.02", 4); data/ebook-speaker-5.5.2/src/common.c:364: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). str = malloc (strlen (misc->daisy_mp) + strlen (namelist[n]->d_name) + 5); data/ebook-speaker-5.5.2/src/common.c:364: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). str = malloc (strlen (misc->daisy_mp) + strlen (namelist[n]->d_name) + 5); data/ebook-speaker-5.5.2/src/common.c:422:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant character. strncpy (misc->daisy_version, "3", 2); data/ebook-speaker-5.5.2/src/common.c:423: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). if (strlen (misc->ncx_name) < 4) data/ebook-speaker-5.5.2/src/common.c:428:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant character. strncpy (misc->daisy_version, "3", 2); data/ebook-speaker-5.5.2/src/common.c:429: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). if (strlen (misc->opf_name) < 4) data/ebook-speaker-5.5.2/src/common.c:557: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). str = malloc (strlen (misc->cmd) + strlen (strerror (e)) + 10); data/ebook-speaker-5.5.2/src/common.c:557: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). str = malloc (strlen (misc->cmd) + strlen (strerror (e)) + 10); data/ebook-speaker-5.5.2/src/common.c:588:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (my_attribute->my_class, attr, MAX_STR - 1); data/ebook-speaker-5.5.2/src/common.c:592:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (my_attribute->href, attr, MAX_STR - 1); data/ebook-speaker-5.5.2/src/common.c:616:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (my_attribute->media_type, attr, MAX_STR - 1); data/ebook-speaker-5.5.2/src/common.c:624:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (attr, (char *) xmlTextReaderGetAttribute data/ebook-speaker-5.5.2/src/common.c:627:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (name, attr, MAX_STR - 1); data/ebook-speaker-5.5.2/src/common.c:632:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (content, attr, MAX_STR - 1); data/ebook-speaker-5.5.2/src/common.c:634:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc->daisy_version, content, MAX_STR - 1); data/ebook-speaker-5.5.2/src/common.c:637:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc->daisy_title, content, MAX_STR - 1); data/ebook-speaker-5.5.2/src/common.c:638:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc->bookmark_title, content, MAX_STR - 1); data/ebook-speaker-5.5.2/src/common.c:661:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc->ncc_totalTime, content, MAX_STR - 1); data/ebook-speaker-5.5.2/src/common.c:669:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (my_attribute->playorder, attr, MAX_STR - 1); data/ebook-speaker-5.5.2/src/common.c:677:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (my_attribute->smilref, attr, MAX_STR - 1); data/ebook-speaker-5.5.2/src/common.c:686:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc->ocr_language, attr, 5); data/ebook-speaker-5.5.2/src/common.c:690:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc->cd_dev, attr, MAX_STR - 1); data/ebook-speaker-5.5.2/src/common.c:712:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (my_attribute->toc, attr, MAX_STR - 1); data/ebook-speaker-5.5.2/src/common.c:716:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (my_attribute->value, attr, MAX_STR - 1); data/ebook-speaker-5.5.2/src/common.c:775:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc->tag, (char *) xmlTextReaderConstName (reader), data/ebook-speaker-5.5.2/src/common.c:792: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). phrase_len = strlen ((char *) xmlTextReaderConstValue (reader)); data/ebook-speaker-5.5.2/src/common.c:804: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). for (x = strlen (misc->label) - 1; x >= 0 && isspace (misc->label[x]); data/ebook-speaker-5.5.2/src/common.c:1027: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). len = strlen (str) - 6 - 1; data/ebook-speaker-5.5.2/src/common.c:1031:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (sink_info[n], &str[6], len); data/ebook-speaker-5.5.2/src/common.c:1051: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). if (strlen (str) > 19) data/ebook-speaker-5.5.2/src/common.c:1053: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). len = strlen (str) + 3; data/ebook-speaker-5.5.2/src/common.c:1068:26: [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). sink_info[n][strlen (sink_info[n]) - 1] = ' '; data/ebook-speaker-5.5.2/src/common.c:1069:26: [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). sink_info[n][strlen (sink_info[n])] = ' '; data/ebook-speaker-5.5.2/src/common.c:1072:22: [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 (x = strlen (str); x >= 0; x--) data/ebook-speaker-5.5.2/src/common.c:1076:22: [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 (x = strlen (str); x >= 0; x--) data/ebook-speaker-5.5.2/src/daisy2.02.c:33: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). src = malloc (strlen (misc->daisy_mp) + strlen (attr) + 3); data/ebook-speaker-5.5.2/src/daisy2.02.c:33: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). src = malloc (strlen (misc->daisy_mp) + strlen (attr) + 3); data/ebook-speaker-5.5.2/src/daisy2.02.c:155: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). strlen (misc->daisy_mp) + strlen (my_attribute->src) + 5); data/ebook-speaker-5.5.2/src/daisy2.02.c:155: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). strlen (misc->daisy_mp) + strlen (my_attribute->src) + 5); data/ebook-speaker-5.5.2/src/daisy2.02.c:183: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). strlen (misc->daisy_mp) + strlen (my_attribute->src) + 5); data/ebook-speaker-5.5.2/src/daisy2.02.c:183: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). strlen (misc->daisy_mp) + strlen (my_attribute->src) + 5); data/ebook-speaker-5.5.2/src/daisy2.02.c:206:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (daisy[i].label, misc->label, 80); data/ebook-speaker-5.5.2/src/daisy2.02.c:288: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). strlen (misc->daisy_mp) + strlen (my_attribute->href) + 5); data/ebook-speaker-5.5.2/src/daisy2.02.c:288: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). strlen (misc->daisy_mp) + strlen (my_attribute->href) + 5); data/ebook-speaker-5.5.2/src/daisy3.c:41: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). file = malloc (strlen (misc->daisy_mp) + data/ebook-speaker-5.5.2/src/daisy3.c:42: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). strlen (my_attribute->src) + 5); data/ebook-speaker-5.5.2/src/daisy3.c:194: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). (strlen (misc->daisy_mp) + strlen (my_attribute->src) + 3); data/ebook-speaker-5.5.2/src/daisy3.c:194: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). (strlen (misc->daisy_mp) + strlen (my_attribute->src) + 3); data/ebook-speaker-5.5.2/src/ebook-speaker.c:53:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (temp[x], misc->tts[x], MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:71:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc->tts[tts_no++], temp[x], MAX_STR); data/ebook-speaker-5.5.2/src/ebook-speaker.c:129:26: [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). str = malloc (10 + strlen (misc->eBook_speaker_txt)); data/ebook-speaker-5.5.2/src/ebook-speaker.c:133: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). if (fwrite (misc->label, strlen (misc->label), 1, w) == 0) data/ebook-speaker-5.5.2/src/ebook-speaker.c:186: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). str = malloc (strlen (pw->pw_dir) + 20 + strlen (misc->bookmark_title)); data/ebook-speaker-5.5.2/src/ebook-speaker.c:186:48: [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). str = malloc (strlen (pw->pw_dir) + 20 + strlen (misc->bookmark_title)); data/ebook-speaker-5.5.2/src/ebook-speaker.c:251:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc->str, misc->label, 80); data/ebook-speaker-5.5.2/src/ebook-speaker.c:309:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (str, misc->tts[y], MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:413: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). new = malloc (strlen (daisy[i].xml_file) + 20); data/ebook-speaker-5.5.2/src/ebook-speaker.c:421: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). str = malloc (strlen (new) + strlen (strerror (e)) + 20); data/ebook-speaker-5.5.2/src/ebook-speaker.c:421: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). str = malloc (strlen (new) + strlen (strerror (e)) + 20); data/ebook-speaker-5.5.2/src/ebook-speaker.c:427:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy (misc->xmlversion, "1.0", 5); data/ebook-speaker-5.5.2/src/ebook-speaker.c:429:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy (misc->encoding, "utf-8", 8); data/ebook-speaker-5.5.2/src/ebook-speaker.c:575: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). str = malloc (strlen (pw->pw_dir) + 20); data/ebook-speaker-5.5.2/src/ebook-speaker.c:578: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). str = realloc (str, strlen (pw->pw_dir) + 20 + data/ebook-speaker-5.5.2/src/ebook-speaker.c:579: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). strlen (misc->bookmark_title)); data/ebook-speaker-5.5.2/src/ebook-speaker.c:627: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). str = malloc (strlen (pw->pw_dir) + 20 + strlen (misc->bookmark_title)); data/ebook-speaker-5.5.2/src/ebook-speaker.c:627:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). str = malloc (strlen (pw->pw_dir) + 20 + strlen (misc->bookmark_title)); data/ebook-speaker-5.5.2/src/ebook-speaker.c:701: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). l = strlen (daisy[i].label) + daisy[i].x; data/ebook-speaker-5.5.2/src/ebook-speaker.c:811: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). str = malloc (20 + strlen (misc->tmp_wav) + data/ebook-speaker-5.5.2/src/ebook-speaker.c:812: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). strlen (strerror (e))); data/ebook-speaker-5.5.2/src/ebook-speaker.c:825: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). first_eBook_speaker_wav = malloc (strlen (misc->daisy_mp) + 50); data/ebook-speaker-5.5.2/src/ebook-speaker.c:851: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). fwrite (misc->label, strlen (misc->label), 1, w); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1040:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy (misc->tts[2], data/ebook-speaker-5.5.2/src/ebook-speaker.c:1043:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy (misc->tts[3], data/ebook-speaker-5.5.2/src/ebook-speaker.c:1111:22: [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 (p) - 1; i > 0; i--) data/ebook-speaker-5.5.2/src/ebook-speaker.c:1115:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc->tts[x++], p, MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1352:16: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc->ocr_language, codes[i][1], 3); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1393:16: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc->ocr_language, codes[i][1], 3); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1442:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (str, misc->daisy_mp, MAX_STR); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1699:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (file, str, MAX_STR); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1705:10: [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 (daisy[0].label, "1"); data/ebook-speaker-5.5.2/src/ebook-speaker.c:1715: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). if ((int) strlen (misc->daisy_title) + data/ebook-speaker-5.5.2/src/ebook-speaker.c:1716: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). (int) strlen (misc->copyright) >= misc->max_x) data/ebook-speaker-5.5.2/src/ebook-speaker.c:1718:57: [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). mvwprintw (misc->titlewin, 0, misc->max_x - strlen ( data/ebook-speaker-5.5.2/src/ebook-speaker.c:1721:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). mvwprintw (misc->titlewin, 0, misc->max_x - strlen (misc->daisy_title), data/ebook-speaker-5.5.2/src/ebook-speaker.c:1956:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (str, misc->tmp_dir, MAX_STR); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2016: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). txt_file = malloc (strlen (daisy[i].xml_file) + 10); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2021:26: [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). folded_file = malloc (strlen (txt_file) + 10); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2076: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 (daisy[i].label) + daisy[i].x >= 53) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2112:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (daisy[j].my_class, daisy[j + 1].my_class, MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2115:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (daisy[j].label, daisy[j + 1].label, 80); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2164:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (s2, pw->pw_dir, MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2228:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (s2, pw->pw_dir, MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2297:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (str, misc->daisy_mp, MAX_STR); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2367:16: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc->bookmark_title, misc->label, MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2392:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc->daisy_title, basename (file), MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2394:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc->bookmark_title, basename (file), MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2411: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). if ((int) strlen (misc->daisy_title) + (int) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2412: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 (misc->copyright) >= misc->max_x) data/ebook-speaker-5.5.2/src/ebook-speaker.c:2413: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). mvwprintw (misc->titlewin, 0, misc->max_x - strlen (misc->daisy_title) - 4, "... "); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2414:48: [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). mvwprintw (misc->titlewin, 0, misc->max_x - strlen (misc->daisy_title), data/ebook-speaker-5.5.2/src/ebook-speaker.c:2430: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). misc->daisy_mp = malloc (strlen (misc->tmp_dir) + 5); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2432: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). if (misc->daisy_mp[strlen (misc->daisy_mp) - 1] != '/') data/ebook-speaker-5.5.2/src/ebook-speaker.c:2433: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 (misc->daisy_mp, "/"); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2478: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). str[strlen (str) - 1] = 0; data/ebook-speaker-5.5.2/src/ebook-speaker.c:2479:22: [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). file = malloc (strlen (misc->tmp_dir) + strlen (str) + 5); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2479: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). file = malloc (strlen (misc->tmp_dir) + strlen (str) + 5); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2491:22: [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). file = malloc (strlen (misc->tmp_dir) + 10); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2553: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). str = malloc (strlen (misc->tmp_dir) + 10); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2763: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). memset (misc.tts[misc.current], 0, strlen (misc.tts[misc.current])); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2767: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). memset (misc.ocr_language, 0, strlen (misc.ocr_language)); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2771: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). memset (misc.xmlversion, 0, strlen (misc.xmlversion)); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2772: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). memset (misc.encoding, 0, strlen (misc.encoding)); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2782: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). memset (misc.option_t, 0, strlen (misc.option_t)); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2825:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc.ocr_language, optarg, 3); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2829:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc.scan_resolution, optarg, 5); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2843:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc.tts[misc.tts_no], optarg, MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2868:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc.ocr_language, o_opt, 3); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2870:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc.scan_resolution, r_opt, 5); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2874:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc.tts[misc.tts_no], t_opt, MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2877: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). memset (misc.search_str, 0, strlen (misc.search_str)); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2886:26: [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). cmd = malloc (50 + strlen (misc.scan_resolution) + data/ebook-speaker-5.5.2/src/ebook-speaker.c:2887: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). strlen (misc.orig_input_file)); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2929:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc.orig_input_file, argv[optind], MAX_STR - 1); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2960:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc.orig_input_file, misc.src_dir, MAX_STR); data/ebook-speaker-5.5.2/src/ebook-speaker.c:2961: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). if (misc.orig_input_file[strlen (misc.orig_input_file) - 1] != '/') data/ebook-speaker-5.5.2/src/list_dir.c:59:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). mvwprintw (misc->titlewin, 1, 77 - strlen (str), " %s -", str); data/ebook-speaker-5.5.2/src/list_dir.c:221: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). misc->src_dir = malloc (strlen (src) + 10); data/ebook-speaker-5.5.2/src/list_dir.c:223:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (misc->src_dir[strlen (misc->src_dir) - 1] != '/') data/ebook-speaker-5.5.2/src/list_dir.c:224:10: [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 (misc->src_dir, "/"); data/ebook-speaker-5.5.2/src/list_dir.c:255:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). mvwprintw (misc->titlewin, 1, 77 - strlen (str), " %s -", str); data/ebook-speaker-5.5.2/src/list_dir.c:287: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). if (misc->src_dir[strlen (misc->src_dir) - 1] != '/') data/ebook-speaker-5.5.2/src/list_dir.c:288:16: [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 (misc->src_dir, "/"); data/ebook-speaker-5.5.2/src/list_dir.c:291: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). if (misc->src_dir[strlen (misc->src_dir) - 1] != '/') data/ebook-speaker-5.5.2/src/list_dir.c:300: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). src = malloc (strlen (misc->src_dir) + data/ebook-speaker-5.5.2/src/list_dir.c:301: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). strlen (namelist [n]->d_name) + 5); data/ebook-speaker-5.5.2/src/list_dir.c:307:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). misc->src_dir = malloc (strlen (src) + 5); data/ebook-speaker-5.5.2/src/list_dir.c:309: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). if (misc->src_dir[strlen (misc->src_dir) - 1] != '/') data/ebook-speaker-5.5.2/src/list_dir.c:310:16: [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 (misc->src_dir, "/"); data/ebook-speaker-5.5.2/src/list_dir.c:317: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). file = malloc (strlen (misc->src_dir) + data/ebook-speaker-5.5.2/src/list_dir.c:318: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). strlen (namelist[n]->d_name) + 10); data/ebook-speaker-5.5.2/src/list_dir.c:320: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). if (file[strlen (file) - 1] != '/') data/ebook-speaker-5.5.2/src/list_dir.c:321:13: [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 (file, "/"); data/ebook-speaker-5.5.2/src/list_dir.c:337:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (name, basename (basec), MAX_STR); data/ebook-speaker-5.5.2/src/list_dir.c:340: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). if (misc->src_dir[strlen (misc->src_dir) - 1] != '/') data/ebook-speaker-5.5.2/src/list_dir.c:407: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). len = strlen (namelist[n]->d_name); data/ebook-speaker-5.5.2/src/list_dir.c:409:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (current_name, namelist[n]->d_name, len); data/ebook-speaker-5.5.2/src/list_dir.c:425: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). str = malloc (strlen (misc->src_dir) + data/ebook-speaker-5.5.2/src/list_dir.c:426: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). strlen (namelist[n]->d_name) + 10); data/ebook-speaker-5.5.2/src/ncx.c:69:16: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (misc->daisy_title, misc->label, MAX_STR - 1); data/ebook-speaker-5.5.2/src/ncx.c:105:50: [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). daisy[misc->current].xml_file, strlen (misc->daisy_mp) + data/ebook-speaker-5.5.2/src/ncx.c:106: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). strlen (src) + 5); data/ebook-speaker-5.5.2/src/ncx.c:143:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (daisy[misc->current].first_id, data/ebook-speaker-5.5.2/src/ncx.c:156:57: [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). (daisy[misc->current].xml_file, strlen data/ebook-speaker-5.5.2/src/ncx.c:157: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). (misc->daisy_mp) + strlen (my_attribute->src) + 5); data/ebook-speaker-5.5.2/src/ncx.c:234:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (daisy[misc->current].first_id, my_attribute->id, data/ebook-speaker-5.5.2/src/ncx.c:295:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (daisy[misc->current].first_id, my_attribute->id, data/ebook-speaker-5.5.2/src/ncx.c:313:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (daisy[misc->current].my_class, my_attribute->my_class, data/ebook-speaker-5.5.2/src/ncx.c:332:22: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (daisy[misc->current].label, misc->label, data/ebook-speaker-5.5.2/src/ncx.c:333: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). 75 - strlen (daisy[misc->current].label)); data/ebook-speaker-5.5.2/src/opf.c:50:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (daisy[i].first_id, my_attribute->id, MAX_STR); data/ebook-speaker-5.5.2/src/opf.c:114:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (daisy[i].label, misc->label, MAX_STR - 1); data/ebook-speaker-5.5.2/src/opf.c:144:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (daisy[i].first_id, my_attribute->id, MAX_STR); data/ebook-speaker-5.5.2/src/opf.c:155: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). daisy[i].xml_file = malloc (strlen (misc->daisy_mp) + data/ebook-speaker-5.5.2/src/opf.c:156: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). strlen (my_attribute->src) + 5); data/ebook-speaker-5.5.2/src/opf.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). (daisy[misc->current].smil_file, strlen data/ebook-speaker-5.5.2/src/opf.c:214: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). (misc->daisy_mp) + strlen (my_attribute->href) + 5); data/ebook-speaker-5.5.2/src/opf.c:230:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (daisy[misc->current].xml_file, strlen data/ebook-speaker-5.5.2/src/opf.c:231: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). (misc->daisy_mp) + strlen (my_attribute->href) + 5); data/ebook-speaker-5.5.2/src/opf.c:289:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). daisy[misc->current].smil_file = malloc (strlen data/ebook-speaker-5.5.2/src/opf.c:290:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (misc->daisy_mp) + strlen (my_attribute->href) + 5); data/ebook-speaker-5.5.2/src/pactl/src/core-util.c:56: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). k = strlen(s); data/ebook-speaker-5.5.2/src/pactl/src/core-util.c:107: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). len = (int) strlen(v); data/ebook-speaker-5.5.2/src/pactl/src/core-util.c:314: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). return strlen(str); data/ebook-speaker-5.5.2/src/pactl/src/core-util.c:328: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(c) <= l) data/ebook-speaker-5.5.2/src/pactl/src/core-util.c:409: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). } else if (strlen(c) < l-1) { data/ebook-speaker-5.5.2/src/pactl/src/core-util.c:488: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). an = strlen(a); data/ebook-speaker-5.5.2/src/pactl/src/core-util.c:645: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). l1 = strlen(s); data/ebook-speaker-5.5.2/src/pactl/src/core-util.c:646: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). l2 = strlen(sfx); data/ebook-speaker-5.5.2/src/pactl/src/core-util.c:659: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). l = strlen(pfx); data/ebook-speaker-5.5.2/src/pactl/src/core-util.c:661: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). return strlen(s) >= l && strncmp(s, pfx, l) == 0; data/ebook-speaker-5.5.2/src/pactl/src/pactl.c:165:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (sink_info[i->index], i->description, 70); data/ebook-speaker-5.5.2/src/pactl/src/pactl.c:166: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). for (x = strlen (sink_info[i->index]); x < 55; x++) data/ebook-speaker-5.5.2/src/pactl/src/pactl.c:308: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). vs[strlen(vs)-1] = 0; data/ebook-speaker-5.5.2/src/pactl/src/pactl.c:312: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). vs[strlen(vs)-2] = 0; data/ebook-speaker-5.5.2/src/pactl/src/strbuf.c:110: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). pa_strbuf_putsn(sb, t, strlen(t)); ANALYSIS SUMMARY: Hits = 439 Lines analyzed = 8305 in approximately 0.31 seconds (26864 lines/second) Physical Source Lines of Code (SLOC) = 6965 Hits@level = [0] 160 [1] 198 [2] 130 [3] 4 [4] 90 [5] 17 Hits@level+ = [0+] 599 [1+] 439 [2+] 241 [3+] 111 [4+] 107 [5+] 17 Hits/KSLOC@level+ = [0+] 86.0014 [1+] 63.0294 [2+] 34.6016 [3+] 15.9368 [4+] 15.3625 [5+] 2.44078 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.