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/xneur-0.20.0/src/newlang_creation.h Examining data/xneur-0.20.0/src/newlang_creation.c Examining data/xneur-0.20.0/src/xneur.c Examining data/xneur-0.20.0/lib/main/plugin.c Examining data/xneur-0.20.0/lib/main/selection.c Examining data/xneur-0.20.0/lib/main/keymap.c Examining data/xneur-0.20.0/lib/main/window.c Examining data/xneur-0.20.0/lib/main/window.h Examining data/xneur-0.20.0/lib/main/event.c Examining data/xneur-0.20.0/lib/main/plugin.h Examining data/xneur-0.20.0/lib/main/utils.h Examining data/xneur-0.20.0/lib/main/bind_table.h Examining data/xneur-0.20.0/lib/main/focus.c Examining data/xneur-0.20.0/lib/main/focus.h Examining data/xneur-0.20.0/lib/main/program.c Examining data/xneur-0.20.0/lib/main/program.h Examining data/xneur-0.20.0/lib/main/switchlang.h Examining data/xneur-0.20.0/lib/main/keymap.h Examining data/xneur-0.20.0/lib/main/utils.c Examining data/xneur-0.20.0/lib/main/defines.h Examining data/xneur-0.20.0/lib/main/event.h Examining data/xneur-0.20.0/lib/main/bind_table.c Examining data/xneur-0.20.0/lib/main/switchlang.c Examining data/xneur-0.20.0/lib/main/selection.h Examining data/xneur-0.20.0/lib/main/buffer.c Examining data/xneur-0.20.0/lib/main/buffer.h Examining data/xneur-0.20.0/lib/notify/sound.h Examining data/xneur-0.20.0/lib/notify/osd.h Examining data/xneur-0.20.0/lib/notify/popup.h Examining data/xneur-0.20.0/lib/notify/notify.h Examining data/xneur-0.20.0/lib/notify/popup.c Examining data/xneur-0.20.0/lib/notify/notify.c Examining data/xneur-0.20.0/lib/notify/osd.c Examining data/xneur-0.20.0/lib/notify/sound.c Examining data/xneur-0.20.0/lib/ai/conversion.h Examining data/xneur-0.20.0/lib/ai/detection.h Examining data/xneur-0.20.0/lib/ai/detection.c Examining data/xneur-0.20.0/lib/ai/conversion.c Examining data/xneur-0.20.0/lib/config/xnconfig.h Examining data/xneur-0.20.0/lib/config/xnconfig.c Examining data/xneur-0.20.0/lib/config/xnconfig_files.c Examining data/xneur-0.20.0/lib/config/xnconfig_files.h Examining data/xneur-0.20.0/lib/misc/types.h Examining data/xneur-0.20.0/lib/misc/mail.c Examining data/xneur-0.20.0/lib/misc/colors.h Examining data/xneur-0.20.0/lib/misc/archiver.h Examining data/xneur-0.20.0/lib/misc/mail.h Examining data/xneur-0.20.0/lib/misc/archiver.c Examining data/xneur-0.20.0/lib/misc/regexp.h Examining data/xneur-0.20.0/lib/misc/log.h Examining data/xneur-0.20.0/lib/misc/text.h Examining data/xneur-0.20.0/lib/misc/debug.c Examining data/xneur-0.20.0/lib/misc/debug.h Examining data/xneur-0.20.0/lib/misc/text.c Examining data/xneur-0.20.0/lib/misc/list_char.c Examining data/xneur-0.20.0/lib/misc/list_char.h Examining data/xneur-0.20.0/lib/misc/regexp.c Examining data/xneur-0.20.0/lib/misc/log.c Examining data/xneur-0.20.0/lib/lib/xneurlib.c Examining data/xneur-0.20.0/lib/lib/xneur.h Examining data/xneur-0.20.0/plugins/test/test.c Examining data/xneur-0.20.0/plugins/statistic/statistic.c FINAL RESULTS: data/xneur-0.20.0/lib/config/xnconfig.c:1274: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. FILE *fp = popen(ps_command, "r"); data/xneur-0.20.0/lib/config/xnconfig_files.c:101:2: [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(path_file, file_name); data/xneur-0.20.0/lib/config/xnconfig_files.c:167:16: [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). path_file = strcat(path_file, DIR_SEPARATOR); data/xneur-0.20.0/lib/config/xnconfig_files.c:169:16: [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). path_file = strcat(path_file, dir_part); data/xneur-0.20.0/lib/lib/xneurlib.c:398:4: [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(dict_name, spell_names[j]); data/xneur-0.20.0/lib/lib/xneurlib.c:400:4: [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(dict_name, handle->languages[lang].dir); data/xneur-0.20.0/lib/main/bind_table.c:68:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(text, modifier_names[i]); data/xneur-0.20.0/lib/main/bind_table.c:72:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(text, hotkey->key); data/xneur-0.20.0/lib/main/buffer.c:406:33: [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). p->i18n_content[i].content = strcat(p->i18n_content[i].content, symbol); data/xneur-0.20.0/lib/main/buffer.c:411:43: [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). p->i18n_content[i].content_unchanged = strcat(p->i18n_content[i].content_unchanged, symbol_unchanged); data/xneur-0.20.0/lib/main/buffer.c:561:32: [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). p->i18n_content[i].content = strcat(p->i18n_content[i].content, symbol); data/xneur-0.20.0/lib/main/buffer.c:566:42: [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). p->i18n_content[i].content_unchanged = strcat(p->i18n_content[i].content_unchanged, symbol_unchanged); data/xneur-0.20.0/lib/main/buffer.c:637:4: [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(utf_string, symbol); data/xneur-0.20.0/lib/main/buffer.c:668:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(utf_string, symbol); data/xneur-0.20.0/lib/main/buffer.c:710:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(xconfig->delimeters_string, symbol); data/xneur-0.20.0/lib/main/keymap.c:334:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(prev_symbols, symbol); data/xneur-0.20.0/lib/main/program.c:239:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text_to_find, "%s", last_app_name); data/xneur-0.20.0/lib/main/program.c:249:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(window_layouts, "%s %d", text_to_find, lang); data/xneur-0.20.0/lib/main/program.c:258:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(window_layouts, "%s %d", text_to_find, p->last_layout); data/xneur-0.20.0/lib/main/program.c:268:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(text_to_find, "%s", curr_app_name); data/xneur-0.20.0/lib/main/program.c:278:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(window_layouts, "%s %d", text_to_find, lang); data/xneur-0.20.0/lib/main/program.c:906:63: [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. pthread_create(&action_thread, &action_thread_attr,(void *) &system, (void *) xconfig->user_actions[action].command); data/xneur-0.20.0/lib/main/program.c:2425:17: [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). new_content = strcat(new_content, p->buffer->content); data/xneur-0.20.0/lib/main/program.c:2426:17: [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). new_content = strcat(new_content, possible_word); data/xneur-0.20.0/lib/main/program.c:2439:17: [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). new_content = strcat(new_content, p->correction_buffer->i18n_content[lang].content_unchanged + strlen(p->correction_buffer->i18n_content[lang].content_unchanged) - finish_offset + 1); data/xneur-0.20.0/lib/main/program.c:3233:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(word_to_dict, "%s%s%s", "(?i)^", curr_word+offset, "$"); data/xneur-0.20.0/lib/main/program.c:3279:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(word_to_dict, "%s%s%s", "(?i)^", new_word+offset, "$"); data/xneur-0.20.0/lib/main/program.c:3328:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(word_to_dict, "%s%s%s", "(?i)^", curr_word+offset, "$"); data/xneur-0.20.0/lib/main/program.c:3343:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(word_to_dict, "%s%s%s", "(?i)^", new_word+offset, "$"); data/xneur-0.20.0/lib/misc/list_char.c:134:4: [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(full_str, data->string); data/xneur-0.20.0/lib/misc/list_char.c:140:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(full_str, data->string); data/xneur-0.20.0/lib/misc/log.c:89:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(time_buffer, "%s ", tb); data/xneur-0.20.0/lib/misc/log.c:107:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stream, buffer, ap); data/xneur-0.20.0/lib/misc/mail.c:206:4: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (cont_app, CONT_APP, file, file); data/xneur-0.20.0/lib/misc/text.c:144:4: [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(result, source); data/xneur-0.20.0/lib/misc/text.c:151:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(result, replace); data/xneur-0.20.0/lib/notify/osd.c:84:15: [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). osd_text = strcat(osd_text, xconfig->osds[notify].file); data/xneur-0.20.0/lib/notify/osd.c:94:15: [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). osd_text = strcat(osd_text, command); data/xneur-0.20.0/lib/notify/sound.c:335:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(command, "%s %s", program_name, path); data/xneur-0.20.0/lib/notify/sound.c:336:6: [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(command) == -1) data/xneur-0.20.0/src/newlang_creation.c:92: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(syll, sym_i); data/xneur-0.20.0/src/newlang_creation.c:93:4: [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(syll, sym_j); data/xneur-0.20.0/src/newlang_creation.c:112:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(syll, "%s%s%s", sym_i, sym_j, sym_k); data/xneur-0.20.0/src/newlang_creation.c:140: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(syll, sym_i); data/xneur-0.20.0/src/newlang_creation.c:141:4: [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(syll, sym_j); data/xneur-0.20.0/src/newlang_creation.c:160:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(syll, "%s%s%s", sym_i, sym_j, sym_k); data/xneur-0.20.0/src/xneur.c:419:2: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LIGHT_PURPLE_COLOR "====================================================" NORMAL_COLOR "\n"); data/xneur-0.20.0/src/xneur.c:420:2: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LIGHT_PURPLE_COLOR ">>> " LIGHT_PURPLE_COLOR "Please visit " RED_COLOR "http://www.xneur.ru" LIGHT_BLUE_COLOR " for support" LIGHT_PURPLE_COLOR " <<<" NORMAL_COLOR "\n"); data/xneur-0.20.0/src/xneur.c:421:2: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LIGHT_PURPLE_COLOR "====================================================" NORMAL_COLOR "\n"); data/xneur-0.20.0/lib/config/xnconfig_files.c:107:49: [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. snprintf(path_file, max_path_len, "%s/%s/%s", getenv("HOME"), HOME_CONF_DIR, file_name); data/xneur-0.20.0/lib/config/xnconfig_files.c:109:52: [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. snprintf(path_file, max_path_len, "%s/%s/%s/%s", getenv("HOME"), HOME_CONF_DIR, dir_name, file_name); data/xneur-0.20.0/lib/config/xnconfig_files.c:124:49: [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. snprintf(path_file, max_path_len, "%s/%s/%s", getenv("HOME"), HOME_CONF_DIR, file_name); data/xneur-0.20.0/lib/config/xnconfig_files.c:126:52: [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. snprintf(path_file, max_path_len, "%s/%s/%s/%s", getenv("HOME"), HOME_CONF_DIR, dir_name, file_name); data/xneur-0.20.0/lib/config/xnconfig_files.c:139:46: [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. snprintf(path_file, max_path_len, "%s/%s", getenv("HOME"), HOME_CONF_DIR); data/xneur-0.20.0/lib/config/xnconfig_files.c:145:49: [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. snprintf(path_file, max_path_len, "%s/%s/%s", getenv("HOME"), HOME_CONF_DIR, file_name); data/xneur-0.20.0/lib/config/xnconfig_files.c:149:46: [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. snprintf(path_file, max_path_len, "%s/%s", getenv("HOME"), HOME_CONF_DIR); data/xneur-0.20.0/lib/config/xnconfig_files.c:157:49: [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. snprintf(path_file, max_path_len, "%s/%s/%s", getenv("HOME"), HOME_CONF_DIR, dir_part); data/xneur-0.20.0/lib/config/xnconfig_files.c:185:52: [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. snprintf(path_file, max_path_len, "%s/%s/%s/%s", getenv("HOME"), HOME_CONF_DIR, dir_name, file_name); data/xneur-0.20.0/src/xneur.c:371:16: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt_long(argc, argv, "vhafg", longopts, NULL)) != -1) data/xneur-0.20.0/lib/config/xnconfig.c:418: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). p->default_group = atoi(get_word(¶m)); data/xneur-0.20.0/lib/config/xnconfig.c:467:20: [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). p->send_delay = atoi(param); data/xneur-0.20.0/lib/config/xnconfig.c:740:29: [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). p->size_keyboard_log = atoi (param); data/xneur-0.20.0/lib/config/xnconfig.c:755:24: [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). p->volume_percent = atoi(get_word(¶m)); data/xneur-0.20.0/lib/config/xnconfig.c:863: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). p->port_keyboard_log = atoi(get_word(¶m)); data/xneur-0.20.0/lib/config/xnconfig.c:942: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). p->popup_expire_timeout = atoi(param); data/xneur-0.20.0/lib/config/xnconfig.c:1220:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *stream = fopen(lock_file_path_name, "w"); data/xneur-0.20.0/lib/config/xnconfig.c:1264: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). pid_t process_id = atoi(pid_str); data/xneur-0.20.0/lib/config/xnconfig.c:1279:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/xneur-0.20.0/lib/config/xnconfig.c:1334:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *stream = fopen(config_file_path_name, "w"); data/xneur-0.20.0/lib/config/xnconfig_files.c:50:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *stream = fopen(file_name, "rb"); data/xneur-0.20.0/lib/config/xnconfig_files.c:89: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). stream = fopen(path_file, "r");\ data/xneur-0.20.0/lib/config/xnconfig_files.c:111:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *stream = fopen(path_file, "r"); data/xneur-0.20.0/lib/config/xnconfig_files.c:215:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *stream = fopen(file_path_name, "w"); data/xneur-0.20.0/lib/main/buffer.c:152:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *source = fopen(arch_file_path_name, "r"); data/xneur-0.20.0/lib/main/buffer.c:153:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *dest = fopen(gz_arch_file_path_name, "w"); data/xneur-0.20.0/lib/main/buffer.c:229:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *stream = fopen(file_path_name, "r"); data/xneur-0.20.0/lib/main/buffer.c:232:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). stream = fopen(file_path_name, "a"); data/xneur-0.20.0/lib/main/buffer.c:266: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). stream = fopen(file_path_name, "r+"); data/xneur-0.20.0/lib/main/buffer.c:450:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->content, content, p->cur_pos); data/xneur-0.20.0/lib/main/keymap.c:204:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(symbol, pr->symbol, pr->symbol_size); data/xneur-0.20.0/lib/main/keymap.c:412:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pr->symbol, sym, sym_size); data/xneur-0.20.0/lib/main/program.c:241:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(text_to_find, "%d", (int) p->last_window); data/xneur-0.20.0/lib/main/program.c:270:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(text_to_find, "%d", (int) p->focus->owner_window); data/xneur-0.20.0/lib/misc/archiver.c:36:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char in[CHUNK]; data/xneur-0.20.0/lib/misc/archiver.c:37:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char out[CHUNK]; data/xneur-0.20.0/lib/misc/debug.c:52:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(pointer, "%p", mem); data/xneur-0.20.0/lib/misc/debug.c:72:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(pointer, "%p", mem); data/xneur-0.20.0/lib/misc/debug.c:90:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(pointer, "%p", mem); data/xneur-0.20.0/lib/misc/debug.c:111:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(pointer, "%p", mem); data/xneur-0.20.0/lib/misc/debug.c:132:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(pointer, "%p", mem); data/xneur-0.20.0/lib/misc/debug.c:145:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(pointer, "%p", new_mem); data/xneur-0.20.0/lib/misc/mail.c:35: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 *mail[CMDCOUNT] = { "EHLO xneur.ru\n", data/xneur-0.20.0/lib/misc/mail.c:54:27: [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. void encodeblock(unsigned char in[3], unsigned char out[4], int len) data/xneur-0.20.0/lib/misc/mail.c:54:48: [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. void encodeblock(unsigned char in[3], unsigned char out[4], int len) data/xneur-0.20.0/lib/misc/mail.c:68: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. unsigned char in[3], out[4]; data/xneur-0.20.0/lib/misc/mail.c:130:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&sock.sin_addr, hp->h_addr, 4); data/xneur-0.20.0/lib/misc/mail.c:148:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *stream = fopen(file, "rb"); data/xneur-0.20.0/lib/misc/mail.c:219:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char recvbuf[DEFAULT_BUFLEN]; data/xneur-0.20.0/plugins/statistic/statistic.c:146:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *stream = fopen(file_path_name, "a"); data/xneur-0.20.0/src/newlang_creation.c:176:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *stream = fopen(proto_file_path, "w"); data/xneur-0.20.0/src/newlang_creation.c:191: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). stream = fopen(proto3_file_path, "w"); data/xneur-0.20.0/lib/ai/conversion.c:119: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). int j = 0, len = strlen(text); data/xneur-0.20.0/lib/ai/detection.c:52:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(word[lang]) == 0) data/xneur-0.20.0/lib/ai/detection.c:71:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(word[cur_lang]) > 0) data/xneur-0.20.0/lib/ai/detection.c:73: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(word[cur_lang]) / sym_len[cur_lang][0] > 1) data/xneur-0.20.0/lib/ai/detection.c:76:77: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). aspell_speller_check(handle->spell_checkers[cur_lang], word[cur_lang], strlen(word[cur_lang]))) data/xneur-0.20.0/lib/ai/detection.c:95:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(word[lang]) == 0) data/xneur-0.20.0/lib/ai/detection.c:104:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(word[lang]) / sym_len[lang][0] > 1) data/xneur-0.20.0/lib/ai/detection.c:106:71: [1] (buffer) strlen: Does not handle 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 (aspell_speller_check(handle->spell_checkers[lang], word[lang], strlen(word[lang]))) data/xneur-0.20.0/lib/ai/detection.c:126:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(word[cur_lang]) > 0) data/xneur-0.20.0/lib/ai/detection.c:128: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(word[cur_lang]) / sym_len[cur_lang][0]) > 1) data/xneur-0.20.0/lib/ai/detection.c:131:75: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). !enchant_dict_check(handle->enchant_dicts[cur_lang], word[cur_lang], strlen(word[cur_lang]))) data/xneur-0.20.0/lib/ai/detection.c:147:114: [1] (buffer) strlen: Does not handle 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 (handle->languages[lang].disable_auto_detection || handle->languages[lang].excluded || lang == cur_lang || (strlen(word[lang]) <= 0)) data/xneur-0.20.0/lib/ai/detection.c:150:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(word[lang]) == 0) data/xneur-0.20.0/lib/ai/detection.c:159:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(word[lang]) / sym_len[lang][0] > 1) data/xneur-0.20.0/lib/ai/detection.c:161:69: [1] (buffer) strlen: Does not handle 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 (!enchant_dict_check(handle->enchant_dicts[lang], word[lang], strlen(word[lang]))) data/xneur-0.20.0/lib/ai/detection.c:185:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(proto, word + local_offset, n_bytes); data/xneur-0.20.0/lib/ai/detection.c:212:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(proto, word+local_offset, n_bytes); data/xneur-0.20.0/lib/ai/detection.c:257:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(word[lang]) == 0) data/xneur-0.20.0/lib/ai/detection.c:298: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). int word_len = strlen(p->get_last_word(p, p->content)); data/xneur-0.20.0/lib/ai/detection.c:308: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). word_len = strlen(word); data/xneur-0.20.0/lib/ai/detection.c:329:82: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char **suggs = enchant_dict_suggest (handle->enchant_dicts[lang], word+offset, strlen(word+offset), &count); data/xneur-0.20.0/lib/ai/detection.c:359:121: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const AspellWordList *suggestions = aspell_speller_suggest (handle->spell_checkers[lang], (const char *) word+offset, strlen(word+offset)); data/xneur-0.20.0/lib/ai/detection.c:423: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). for (offset = 0; offset < strlen(word[i]); offset++) data/xneur-0.20.0/lib/ai/detection.c:437:87: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sym_len[i] = p->i18n_content[i].symbol_len + p->get_last_word_offset(p, p->content, strlen(p->content)); data/xneur-0.20.0/lib/ai/detection.c:458: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). int len = strlen(p->content); data/xneur-0.20.0/lib/ai/detection.c:498: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). for (offset = 0; offset < strlen(word[i]); offset++) data/xneur-0.20.0/lib/ai/detection.c:512:87: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sym_len[i] = p->i18n_content[i].symbol_len + p->get_last_word_offset(p, p->content, strlen(p->content)); data/xneur-0.20.0/lib/ai/detection.c:537: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). int len = strlen(p->content); data/xneur-0.20.0/lib/config/xnconfig.c:436: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(param1) != 0) data/xneur-0.20.0/lib/config/xnconfig.c:445: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). else if (strlen(param2) != 0) data/xneur-0.20.0/lib/config/xnconfig.c:581: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). int len = strlen(line) - strlen(cmd); data/xneur-0.20.0/lib/config/xnconfig.c:581: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). int len = strlen(line) - strlen(cmd); data/xneur-0.20.0/lib/config/xnconfig.c:585: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). new_user_action->command = strdup(cmd + strlen(USR_CMD_START)*sizeof(char)); data/xneur-0.20.0/lib/config/xnconfig.c:586: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). cmd = strstr(cmd + strlen(USR_CMD_START)*sizeof(char), USR_CMD_END); data/xneur-0.20.0/lib/config/xnconfig.c:594:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(new_user_action->command) - strlen(cmd); data/xneur-0.20.0/lib/config/xnconfig.c:594: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). len = strlen(new_user_action->command) - strlen(cmd); data/xneur-0.20.0/lib/config/xnconfig.c:634: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(param1) != 0) data/xneur-0.20.0/lib/config/xnconfig.c:641:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(tmp) != 0) data/xneur-0.20.0/lib/config/xnconfig.c:644: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). else if (strlen(line) != 0) data/xneur-0.20.0/lib/config/xnconfig.c:693: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(param1) != 0) data/xneur-0.20.0/lib/config/xnconfig.c:700:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(tmp) != 0) data/xneur-0.20.0/lib/config/xnconfig.c:703: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). else if (strlen(line) != 0) data/xneur-0.20.0/lib/config/xnconfig.c:1773: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). int path_len = strlen(LANGUAGEDIR) + strlen(p->handle->languages[lang].dir) + 2; data/xneur-0.20.0/lib/config/xnconfig.c:1773: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). int path_len = strlen(LANGUAGEDIR) + strlen(p->handle->languages[lang].dir) + 2; data/xneur-0.20.0/lib/config/xnconfig.c:1788: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). int path_len = strlen(LANGUAGEDIR) + strlen(p->handle->languages[lang].dir) + 2; data/xneur-0.20.0/lib/config/xnconfig.c:1788: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). int path_len = strlen(LANGUAGEDIR) + strlen(p->handle->languages[lang].dir) + 2; data/xneur-0.20.0/lib/config/xnconfig.c:1801: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). int path_len = strlen(LANGUAGEDIR) + strlen(p->handle->languages[lang].dir) + 2; data/xneur-0.20.0/lib/config/xnconfig.c:1801: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). int path_len = strlen(LANGUAGEDIR) + strlen(p->handle->languages[lang].dir) + 2; data/xneur-0.20.0/lib/lib/xneurlib.c:310: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). int path_len = strlen(LANGUAGEDIR) + strlen(handle->languages[lang].dir) + 2; data/xneur-0.20.0/lib/lib/xneurlib.c:310:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int path_len = strlen(LANGUAGEDIR) + strlen(handle->languages[lang].dir) + 2; data/xneur-0.20.0/lib/lib/xneurlib.c:394: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). char *dict_name = malloc (2 * strlen(spell_names[j]) + 2); data/xneur-0.20.0/lib/lib/xneurlib.c:399:4: [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(dict_name, "_"); data/xneur-0.20.0/lib/main/bind_table.c:59:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *text = (char *) malloc((24 + 1 + strlen(hotkey->key)) * sizeof(char)); data/xneur-0.20.0/lib/main/bind_table.c:69:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(text, "+"); data/xneur-0.20.0/lib/main/buffer.c:129: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). int len = strlen(file_path_name) + strlen(date) + strlen(time) + 4; data/xneur-0.20.0/lib/main/buffer.c:129: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). int len = strlen(file_path_name) + strlen(date) + strlen(time) + 4; data/xneur-0.20.0/lib/main/buffer.c:129:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(file_path_name) + strlen(date) + strlen(time) + 4; data/xneur-0.20.0/lib/main/buffer.c:196:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (p->content) < 4) data/xneur-0.20.0/lib/main/buffer.c:403:62: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *tmp = (char *) realloc(p->i18n_content[i].content, (strlen(p->i18n_content[i].content) + strlen(symbol) + 1) * sizeof(char)); data/xneur-0.20.0/lib/main/buffer.c:403:99: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *tmp = (char *) realloc(p->i18n_content[i].content, (strlen(p->i18n_content[i].content) + strlen(symbol) + 1) * sizeof(char)); data/xneur-0.20.0/lib/main/buffer.c:408:66: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tmp = (char *) realloc(p->i18n_content[i].content_unchanged, (strlen(p->i18n_content[i].content_unchanged) + strlen(symbol_unchanged) + 1) * sizeof(char)); data/xneur-0.20.0/lib/main/buffer.c:408:113: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tmp = (char *) realloc(p->i18n_content[i].content_unchanged, (strlen(p->i18n_content[i].content_unchanged) + strlen(symbol_unchanged) + 1) * sizeof(char)); data/xneur-0.20.0/lib/main/buffer.c:416: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). p->i18n_content[i].symbol_len[k] = strlen(symbol); data/xneur-0.20.0/lib/main/buffer.c:421:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p->i18n_content[i].symbol_len_unchanged[k] = strlen(symbol_unchanged); data/xneur-0.20.0/lib/main/buffer.c:439: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). p->cur_pos = strlen(content); data/xneur-0.20.0/lib/main/buffer.c:455: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). p->cur_pos = strlen(p->content); data/xneur-0.20.0/lib/main/buffer.c:558:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *tmp = realloc(p->i18n_content[i].content, (strlen(p->i18n_content[i].content) + strlen(symbol) + 1) * sizeof(char)); data/xneur-0.20.0/lib/main/buffer.c:558:89: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *tmp = realloc(p->i18n_content[i].content, (strlen(p->i18n_content[i].content) + strlen(symbol) + 1) * sizeof(char)); data/xneur-0.20.0/lib/main/buffer.c:563:56: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tmp = realloc(p->i18n_content[i].content_unchanged, (strlen(p->i18n_content[i].content_unchanged) + strlen(symbol_unchanged) + 1) * sizeof(char)); data/xneur-0.20.0/lib/main/buffer.c:563:103: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tmp = realloc(p->i18n_content[i].content_unchanged, (strlen(p->i18n_content[i].content_unchanged) + strlen(symbol_unchanged) + 1) * sizeof(char)); data/xneur-0.20.0/lib/main/buffer.c:571: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). p->i18n_content[i].symbol_len[p->cur_pos] = strlen(symbol); data/xneur-0.20.0/lib/main/buffer.c:576: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). p->i18n_content[i].symbol_len_unchanged[p->cur_pos] = strlen(symbol_unchanged); data/xneur-0.20.0/lib/main/buffer.c:596: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). p->i18n_content[i].content[strlen(p->i18n_content[i].content) - p->i18n_content[i].symbol_len[p->cur_pos]] = NULLSYM; data/xneur-0.20.0/lib/main/buffer.c:597:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p->i18n_content[i].content_unchanged[strlen(p->i18n_content[i].content_unchanged) - p->i18n_content[i].symbol_len_unchanged[p->cur_pos]] = NULLSYM; data/xneur-0.20.0/lib/main/buffer.c:633: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). char *tmp = realloc(utf_string, strlen(utf_string) * sizeof(char) + nbytes + 1); data/xneur-0.20.0/lib/main/buffer.c:664: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). char *tmp = realloc(utf_string, strlen(utf_string) * sizeof(char) + strlen(symbol) + 1); data/xneur-0.20.0/lib/main/buffer.c:664:72: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *tmp = realloc(utf_string, strlen(utf_string) * sizeof(char) + strlen(symbol) + 1); data/xneur-0.20.0/lib/main/buffer.c:704:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(xconfig->delimeters_string) == 0) data/xneur-0.20.0/lib/main/buffer.c:709: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(symbol) == 1) data/xneur-0.20.0/lib/main/buffer.c:762: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). int len = strlen(string); data/xneur-0.20.0/lib/main/event.c:88:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(xconfig->send_delay * 1000); data/xneur-0.20.0/lib/main/event.c:117:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(xconfig->send_delay * 1000); data/xneur-0.20.0/lib/main/focus.c:72:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/xneur-0.20.0/lib/main/focus.c:112:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100000); data/xneur-0.20.0/lib/main/keymap.c:156:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(symbol, " "); data/xneur-0.20.0/lib/main/keymap.c:193: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). pr->symbol_size = (strlen(symbol) + 1) * sizeof(char); data/xneur-0.20.0/lib/main/keymap.c:336: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). if (strncmp(sym, symbol, strlen(symbol)) != 0) data/xneur-0.20.0/lib/main/keymap.c:339: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). size_t _symbol_len = strlen(symbol); data/xneur-0.20.0/lib/main/keymap.c:382: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). size_t sym_size = strlen(sym); data/xneur-0.20.0/lib/main/keymap.c:461: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). int text_len = strlen(text); data/xneur-0.20.0/lib/main/plugin.c:46: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). size_t len = strlen(XNEUR_PLUGIN_DIR) + strlen(plugin_name) + 2; data/xneur-0.20.0/lib/main/plugin.c:46: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). size_t len = strlen(XNEUR_PLUGIN_DIR) + strlen(plugin_name) + 2; data/xneur-0.20.0/lib/main/program.c:1374: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). KeyCode *dummy_kc = malloc((strlen(replacement)+1) * sizeof(KeyCode)); data/xneur-0.20.0/lib/main/program.c:1375: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). int *dummy_kc_mod = malloc((strlen(replacement)+1) * sizeof(int)); data/xneur-0.20.0/lib/main/program.c:1382: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). dummy_kc = malloc((strlen(word)+1) * sizeof(KeyCode)); data/xneur-0.20.0/lib/main/program.c:1383: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). dummy_kc_mod = malloc((strlen(word)+1) * sizeof(int)); data/xneur-0.20.0/lib/main/program.c:1400: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). int backspaces_count = strlen(p->buffer->get_last_word(p->buffer, p->buffer->content)); data/xneur-0.20.0/lib/main/program.c:1514:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(word) < 3) data/xneur-0.20.0/lib/main/program.c:1630: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). int pos = strlen(word); data/xneur-0.20.0/lib/main/program.c:1773: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). int text_len = strlen(text); data/xneur-0.20.0/lib/main/program.c:1812: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). int text_len = strlen(text); data/xneur-0.20.0/lib/main/program.c:1860: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). int text_len = strlen(text); data/xneur-0.20.0/lib/main/program.c:1922: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). int text_len = strlen(text); data/xneur-0.20.0/lib/main/program.c:2041: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). int offset = strlen(text) - 1; data/xneur-0.20.0/lib/main/program.c:2053: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 (offset = strlen(text) - 2; offset > 1; offset--) data/xneur-0.20.0/lib/main/program.c:2081:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(tmp) < MIN_PATTERN_LEN - 1) data/xneur-0.20.0/lib/main/program.c:2092: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). int len = trim_word(word, strlen(tmp)); data/xneur-0.20.0/lib/main/program.c:2132:61: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tmp_buffer->set_content(tmp_buffer, pattern_data->string + strlen(word)*sizeof(char)); data/xneur-0.20.0/lib/main/program.c:2174:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(tmp) < MIN_PATTERN_LEN - 1) data/xneur-0.20.0/lib/main/program.c:2184: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). int len = trim_word(word, strlen(tmp)); data/xneur-0.20.0/lib/main/program.c:2219:84: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tmp_buffer->set_content(tmp_buffer, list_alike->data[p->last_pattern_id].string + strlen(word)*sizeof(char)); data/xneur-0.20.0/lib/main/program.c:2263:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((strlen(word) > 250) || (strlen(word) < 4)) data/xneur-0.20.0/lib/main/program.c:2263: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 ((strlen(word) > 250) || (strlen(word) < 4)) data/xneur-0.20.0/lib/main/program.c:2281: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). for (offset = 0; offset < strlen(word); offset++) data/xneur-0.20.0/lib/main/program.c:2296:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(word+offset) <= 0) data/xneur-0.20.0/lib/main/program.c:2302:77: [1] (buffer) strlen: Does not handle 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 (!enchant_dict_check(xconfig->handle->enchant_dicts[lang], word+offset, strlen(word+offset))) data/xneur-0.20.0/lib/main/program.c:2308:90: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char **suggs = enchant_dict_suggest (xconfig->handle->enchant_dicts[lang], word+offset, strlen(word+offset), &count); data/xneur-0.20.0/lib/main/program.c:2347:79: [1] (buffer) strlen: Does not handle 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 (aspell_speller_check(xconfig->handle->spell_checkers[lang], word+offset, strlen(word+offset))) data/xneur-0.20.0/lib/main/program.c:2352:129: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const AspellWordList *suggestions = aspell_speller_suggest (xconfig->handle->spell_checkers[lang], (const char *) word+offset, strlen(word+offset)); data/xneur-0.20.0/lib/main/program.c:2420:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int possible_word_len = strlen(possible_word); data/xneur-0.20.0/lib/main/program.c:2429: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 (int i = strlen(p->correction_buffer->i18n_content[lang].content_unchanged) - 1; i >= 0 ; i--) data/xneur-0.20.0/lib/main/program.c:2439:98: [1] (buffer) strlen: Does not handle 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_content = strcat(new_content, p->correction_buffer->i18n_content[lang].content_unchanged + strlen(p->correction_buffer->i18n_content[lang].content_unchanged) - finish_offset + 1); data/xneur-0.20.0/lib/main/program.c:2452: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). int notify_text_len = strlen(_("Correction '%s' to '%s'")) + strlen(word+offset) + 1 + possible_word_len; data/xneur-0.20.0/lib/main/program.c:2452:64: [1] (buffer) strlen: Does not handle 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 notify_text_len = strlen(_("Correction '%s' to '%s'")) + strlen(word+offset) + 1 + possible_word_len; data/xneur-0.20.0/lib/main/program.c:2581: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). size_t sym_size = strlen(","); data/xneur-0.20.0/lib/main/program.c:2596: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). size_t sym_size = strlen(","); data/xneur-0.20.0/lib/main/program.c:2634:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100000); data/xneur-0.20.0/lib/main/program.c:2652: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). size_t sym_size = strlen("-"); data/xneur-0.20.0/lib/main/program.c:2662: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). sym_size = strlen(" "); data/xneur-0.20.0/lib/main/program.c:2695:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100000); data/xneur-0.20.0/lib/main/program.c:2752:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100000); data/xneur-0.20.0/lib/main/program.c:2809:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100000); data/xneur-0.20.0/lib/main/program.c:2866:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100000); data/xneur-0.20.0/lib/main/program.c:3206: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). int len = trim_word(curr_word, strlen(tmp)); data/xneur-0.20.0/lib/main/program.c:3214: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(curr_word) == 0) data/xneur-0.20.0/lib/main/program.c:3221: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). for (offset = 0; offset < strlen(curr_word); offset++) data/xneur-0.20.0/lib/main/program.c:3230: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). char *word_to_dict = malloc((strlen(curr_word+offset) + 7) * sizeof(char)); data/xneur-0.20.0/lib/main/program.c:3250: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). int new_len = trim_word(new_word, strlen(tmp)); data/xneur-0.20.0/lib/main/program.c:3258:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(new_word) == 0) data/xneur-0.20.0/lib/main/program.c:3265: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). for (offset = 0; offset < strlen(new_word); offset++) data/xneur-0.20.0/lib/main/program.c:3273: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). char *word_to_dict = malloc((strlen(new_word+offset) + 7) * sizeof(char)); data/xneur-0.20.0/lib/main/program.c:3300: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). int len = trim_word(curr_word, strlen(tmp)); data/xneur-0.20.0/lib/main/program.c:3308: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(curr_word) == 0) data/xneur-0.20.0/lib/main/program.c:3315: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). for (offset = 0; offset < strlen(curr_word); offset++) data/xneur-0.20.0/lib/main/program.c:3325: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). char *word_to_dict = malloc((strlen(curr_word+offset) + 7) * sizeof(char)); data/xneur-0.20.0/lib/main/program.c:3340: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). char *word_to_dict = malloc((strlen(new_word+offset) + 7) * sizeof(char)); data/xneur-0.20.0/lib/main/program.c:3368:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(tmp) < MIN_PATTERN_LEN) data/xneur-0.20.0/lib/main/program.c:3377: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). int len = trim_word(new_word, strlen(tmp)); data/xneur-0.20.0/lib/main/program.c:3385:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(new_word) == 0) data/xneur-0.20.0/lib/main/program.c:3392: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). for (offset = 0; offset < strlen(new_word); offset++) data/xneur-0.20.0/lib/main/program.c:3408: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). len = trim_word(old_word, strlen(tmp)); data/xneur-0.20.0/lib/main/program.c:3415: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). for (offset = 0; offset < strlen(old_word); offset++) data/xneur-0.20.0/lib/main/program.c:3434:89: [1] (buffer) strlen: Does not handle 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 (!aspell_speller_check(xconfig->handle->spell_checkers[new_lang], new_word+offset, strlen(new_word))) data/xneur-0.20.0/lib/main/program.c:3445:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(new_word+offset) <= 0) data/xneur-0.20.0/lib/main/program.c:3451:85: [1] (buffer) strlen: Does not handle 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 (enchant_dict_check(xconfig->handle->enchant_dicts[new_lang], new_word+offset, strlen(new_word+offset))) data/xneur-0.20.0/lib/misc/list_char.c:122:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen(data->string) + 2; data/xneur-0.20.0/lib/misc/list_char.c:135:4: [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(full_str, "|"); data/xneur-0.20.0/lib/misc/list_char.c:211:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(string) < 4) data/xneur-0.20.0/lib/misc/list_char.c:218: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). if (strncmp(list->data[id].string, string, strlen(string)) != 0) data/xneur-0.20.0/lib/misc/list_char.c:226:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(string) < 4) data/xneur-0.20.0/lib/misc/list_char.c:233: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). if (strncmp(list->data[id].string, string, strlen(string)) != 0) data/xneur-0.20.0/lib/misc/list_char.c:240: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). if (strncmp(list->data[i].string, string, strlen(string)) != 0) data/xneur-0.20.0/lib/misc/log.c:87: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). time_buffer = malloc((strlen(tb) + 1) * sizeof(char)); data/xneur-0.20.0/lib/misc/log.c:98: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). int len = strlen(string) + strlen(modifier) + strlen(time_buffer) + 3; data/xneur-0.20.0/lib/misc/log.c:98: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). int len = strlen(string) + strlen(modifier) + strlen(time_buffer) + 3; data/xneur-0.20.0/lib/misc/log.c:98: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). int len = strlen(string) + strlen(modifier) + strlen(time_buffer) + 3; data/xneur-0.20.0/lib/misc/mail.c:77:28: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). in[i] = (unsigned char) getc(infile); data/xneur-0.20.0/lib/misc/mail.c:186: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). send_packet(fd, mail[i], strlen(mail[i]), 0); data/xneur-0.20.0/lib/misc/mail.c:189: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). send_packet(fd, rcpt, strlen(rcpt), 0); data/xneur-0.20.0/lib/misc/mail.c:194: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). send_packet(fd, FROM, strlen(FROM), 0); data/xneur-0.20.0/lib/misc/mail.c:196: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). send_packet(fd, rcpt, strlen(rcpt), 0); data/xneur-0.20.0/lib/misc/mail.c:198: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). send_packet(fd, SUBJ, strlen(SUBJ), 0); data/xneur-0.20.0/lib/misc/mail.c:199: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). send_packet(fd, MIME, strlen(MIME), 0); data/xneur-0.20.0/lib/misc/mail.c:200: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). send_packet(fd, CONT_MIX, strlen(CONT_MIX), 0); data/xneur-0.20.0/lib/misc/mail.c:201: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). send_packet(fd, BOUN, strlen(BOUN), 0); data/xneur-0.20.0/lib/misc/mail.c:202: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). send_packet(fd, CONT_TXT, strlen(CONT_TXT), 0); data/xneur-0.20.0/lib/misc/mail.c:203: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). send_packet(fd, TEXT, strlen(TEXT), 0); data/xneur-0.20.0/lib/misc/mail.c:204: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). send_packet(fd, BOUN, strlen(BOUN), 0); data/xneur-0.20.0/lib/misc/mail.c:205: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). char *cont_app = malloc((strlen(CONT_APP)+ 2*strlen(file) + 5) * sizeof(char)); data/xneur-0.20.0/lib/misc/mail.c:205:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *cont_app = malloc((strlen(CONT_APP)+ 2*strlen(file) + 5) * sizeof(char)); data/xneur-0.20.0/lib/misc/mail.c:207: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). send_packet(fd, cont_app, strlen(cont_app), 0); data/xneur-0.20.0/lib/misc/mail.c:211: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). send_packet(fd, base64text, strlen(base64text), 0); data/xneur-0.20.0/lib/misc/mail.c:214: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). send_packet(fd, BOUN_END, strlen(BOUN_END), 0); data/xneur-0.20.0/lib/misc/regexp.c:48: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). int str_len = strlen(str); data/xneur-0.20.0/lib/misc/text.c:107: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). int len = strlen(word); data/xneur-0.20.0/lib/misc/text.c:129: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). int source_len = strlen(source); data/xneur-0.20.0/lib/misc/text.c:130: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). int search_len = strlen(search); data/xneur-0.20.0/lib/misc/text.c:131: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 replace_len = strlen(replace); data/xneur-0.20.0/lib/misc/text.c:149:4: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(result, source, (found - source)/sizeof(char)); data/xneur-0.20.0/lib/misc/text.c:219: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). int len = strlen(word); data/xneur-0.20.0/lib/misc/text.c:285:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int ls = strlen(s), lt = strlen(t); data/xneur-0.20.0/lib/misc/text.c:285:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int ls = strlen(s), lt = strlen(t); data/xneur-0.20.0/lib/notify/osd.c:80: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). char *tmp = realloc(osd_text, (strlen(osd_text) + strlen(xconfig->osds[notify].file) + 1) * sizeof(char)); data/xneur-0.20.0/lib/notify/osd.c:80:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *tmp = realloc(osd_text, (strlen(osd_text) + strlen(xconfig->osds[notify].file) + 1) * sizeof(char)); data/xneur-0.20.0/lib/notify/osd.c:89: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). char *tmp = realloc(osd_text, (strlen(osd_text) + strlen(command) + 1) * sizeof(char)); data/xneur-0.20.0/lib/notify/osd.c:89:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *tmp = realloc(osd_text, (strlen(osd_text) + strlen(command) + 1) * sizeof(char)); data/xneur-0.20.0/lib/notify/osd.c:93:15: [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. osd_text = strcat(osd_text, " "); data/xneur-0.20.0/lib/notify/sound.c:334: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). char *command = malloc((strlen(path) + strlen(program_name) + 1) * sizeof(char)); data/xneur-0.20.0/lib/notify/sound.c:334:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *command = malloc((strlen(path) + strlen(program_name) + 1) * sizeof(char)); ANALYSIS SUMMARY: Hits = 300 Lines analyzed = 15678 in approximately 0.46 seconds (34231 lines/second) Physical Source Lines of Code (SLOC) = 11050 Hits@level = [0] 377 [1] 199 [2] 42 [3] 10 [4] 49 [5] 0 Hits@level+ = [0+] 677 [1+] 300 [2+] 101 [3+] 59 [4+] 49 [5+] 0 Hits/KSLOC@level+ = [0+] 61.267 [1+] 27.1493 [2+] 9.14027 [3+] 5.33937 [4+] 4.43439 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.