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/tuxpaint-config-0.0.14/visualc/resource.h Examining data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx Examining data/tuxpaint-config-0.0.14/src/version.h Examining data/tuxpaint-config-0.0.14/src/tuxpaint-config.cxx Examining data/tuxpaint-config-0.0.14/src/win32utils.cxx Examining data/tuxpaint-config-0.0.14/src/about.h Examining data/tuxpaint-config-0.0.14/src/tuxpaint-config2.h Examining data/tuxpaint-config-0.0.14/src/defaults.h Examining data/tuxpaint-config-0.0.14/src/defaults.cxx Examining data/tuxpaint-config-0.0.14/src/win32utils.h FINAL RESULTS: data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:265:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(mkdirCommand); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:289:7: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system("mkdir -p '/Library/Application Support/TuxPaint'"); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:985:14: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "windowsize=%sx", window_widths[i]); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:992:14: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "windowsize=%sx%s", data/tuxpaint-config-0.0.14/src/win32utils.cxx:20:11: [4] (format) snprintf: 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. #define snprintf _snprintf data/tuxpaint-config-0.0.14/src/win32utils.cxx:20:25: [4] (format) _snprintf: 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. #define snprintf _snprintf data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:260:11: [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. if (getenv("HOME") != NULL) data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:264:72: [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. "mkdir -p '%s/Library/Application Support/TuxPaint'", getenv("HOME")); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:267:74: [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. "%s/Library/Application Support/TuxPaint/tuxpaint.cfg", getenv("HOME")); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:271:11: [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. if (getenv("HOME") != NULL) data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:274:36: [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. "%s/.tuxpaintrc", getenv("HOME")); data/tuxpaint-config-0.0.14/src/tuxpaint-config.cxx:108: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 buf[80]; data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:47: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 conf_filename[256]; data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:49: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. const char * window_widths[NUM_WINDOW_WIDTHS] = { data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:64: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. const char * window_heights[NUM_WINDOW_HEIGHTS] = { data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:85: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. const char * langs[NUM_LANGS][2] = { data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:220: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. const char * layouts[NUM_LAYOUTS][2] = { data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:246:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(conf_filename, "tuxpaint.cfg"); /* default config file */ data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:258: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(conf_filename, "tuxpaint.cfg"); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:262:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mkdirCommand[256]; data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:287: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(conf_filename, "tuxpaint.cfg"); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:290: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(conf_filename, "/Library/Application Support/TuxPaint/tuxpaint.cfg"); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:572: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). fd = fopen(conf_filename,flg); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:588:9: [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). fd = fopen(conf_filename,flg); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:901: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 line[256]; data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:942:9: [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). fd = fopen(conf_filename,flg); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:981:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[32]; data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1037: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). SLIDER_stampsize->value(atoi(line + 10)); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1067: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). VALUEINPUT_printdelay->value(atoi(strstr(line, "printdelay=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1275: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). SPINNER_joystick_dev->value(atoi(strstr(line, "joystick-dev=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1278: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). SPINNER_joystick_slowness->value(atoi(strstr(line, "joystick-slowness=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1281: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). SPINNER_joystick_threshold->value(atoi(strstr(line, "joystick-threshold=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1284: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). SPINNER_joystick_maxsteps->value(atoi(strstr(line, "joystick-maxsteps=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1287:42: [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). SPINNER_joystick_hat_slowness->value(atoi(strstr(line, "joystick-hat-slowness=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1290:41: [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). SPINNER_joystick_hat_timeout->value(atoi(strstr(line, "joystick-hat-timeout=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1314: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). SPINNER_joystick_btn_brush->value(atoi(strstr(line, "joystick-btn-brush=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1317: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). SPINNER_joystick_btn_label->value(atoi(strstr(line, "joystick-btn-label=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1320:37: [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). SPINNER_joystick_btn_new->value(atoi(strstr(line, "joystick-btn-new=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1323: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). SPINNER_joystick_btn_print->value(atoi(strstr(line, "joystick-btn-print=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1326: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). SPINNER_joystick_btn_shapes->value(atoi(strstr(line, "joystick-btn-shapes=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1329: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). SPINNER_joystick_btn_undo->value(atoi(strstr(line, "joystick-btn-undo=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1332: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). SPINNER_joystick_btn_eraser->value(atoi(strstr(line, "joystick-btn-eraser=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1335: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). SPINNER_joystick_btn_lines->value(atoi(strstr(line, "joystick-btn-lines=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1338: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). SPINNER_joystick_btn_open->value(atoi(strstr(line, "joystick-btn-open=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1341: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). SPINNER_joystick_btn_redo->value(atoi(strstr(line, "joystick-btn-redo=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1344: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). SPINNER_joystick_btn_stamp->value(atoi(strstr(line, "joystick-btn-stamp=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1347: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). SPINNER_joystick_btn_escape->value(atoi(strstr(line, "joystick-btn-escape=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1350: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). SPINNER_joystick_btn_magic->value(atoi(strstr(line, "joystick-btn-magic=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1353:41: [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). SPINNER_joystick_btn_pgsetup->value(atoi(strstr(line, "joystick-btn-pgsetup=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1356: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). SPINNER_joystick_btn_save->value(atoi(strstr(line, "joystick-btn-save=") + data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1359: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). SPINNER_joystick_btn_text->value(atoi(strstr(line, "joystick-btn-text=") + data/tuxpaint-config-0.0.14/src/win32utils.cxx:69: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 prefix[MAX_PATH]; data/tuxpaint-config-0.0.14/src/win32utils.cxx:70: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 path[2*MAX_PATH]; data/tuxpaint-config-0.0.14/src/win32utils.cxx:90: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 path[2*MAX_PATH]; data/tuxpaint-config-0.0.14/src/defaults.cxx:346: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(TEXTINPUT_joystick_buttons_ignore->value()) > 0) data/tuxpaint-config-0.0.14/src/tuxpaint-config.cxx:114: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). for (j = 0; j <= strlen(about_text); j++) data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:633: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(FILEINPUT_colorfile->value()) > 0) data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:720: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(TEXTINPUT_printcmd->value()) > 0) data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:729: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(TEXTINPUT_printdia->value()) > 0) data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:760: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(FILEINPUT_alternatesavedir->value()) > 0) data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:788: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(FILEINPUT_alternatedatadir->value()) > 0) data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:838: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(TEXTINPUT_joystick_buttons_ignore->value()) > 0) data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:952: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). while (strlen(line) > 0 && data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:953: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). (line[strlen(line) - 1] == '\r' || data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:954: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). line[strlen(line) - 1] == '\n')) data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:956: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). line[strlen(line) - 1] = '\0'; data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1045: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). lang = strstr(line, "lang=") + strlen("lang="); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1068: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). strlen("printdelay="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1073: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). strlen("printcommand=")); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1093: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). strlen("altprintcommand=")); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1137: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 (strcmp(line + strlen("papersize="), papersizes[i]) == 0) data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1165: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("savedir=")); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1187: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("datadir=")); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1214: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("colorfile=")); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1260: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). lay = strstr(line, "onscreen-keyboard-layout=") + strlen("onscreen-keyboard-layout="); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1276: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). strlen("joystick-dev="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1279: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). strlen("joystick-slowness="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1282: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). strlen("joystick-threshold="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1285: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). strlen("joystick-maxsteps="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1288: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). strlen("joystick-hat-slowness="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1291: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). strlen("joystick-hat-timeout="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1296: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). strlen("joystick-buttons-ignore=")); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1315: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). strlen("joystick-btn-brush="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1318: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). strlen("joystick-btn-label="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1321: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). strlen("joystick-btn-new="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1324: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). strlen("joystick-btn-print="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1327: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). strlen("joystick-btn-shapes="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1330: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). strlen("joystick-btn-undo="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1333: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). strlen("joystick-btn-eraser="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1336: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). strlen("joystick-btn-lines="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1339: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). strlen("joystick-btn-open="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1342: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). strlen("joystick-btn-redo="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1345: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). strlen("joystick-btn-stamp="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1348: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). strlen("joystick-btn-escape="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1351: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). strlen("joystick-btn-magic="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1354: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). strlen("joystick-btn-pgsetup="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1357: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). strlen("joystick-btn-save="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1360: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). strlen("joystick-btn-text="))); data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1640: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 (dirname != NULL && strlen(dirname) > 0) { data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1672: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 (dirname != NULL && strlen(dirname) > 0) { data/tuxpaint-config-0.0.14/src/tuxpaint-config2.cxx:1703: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 (filename != NULL && strlen(filename) > 0) { data/tuxpaint-config-0.0.14/src/win32utils.cxx:51:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(path); ANALYSIS SUMMARY: Hits = 102 Lines analyzed = 4184 in approximately 0.55 seconds (7655 lines/second) Physical Source Lines of Code (SLOC) = 3418 Hits@level = [0] 92 [1] 48 [2] 43 [3] 5 [4] 6 [5] 0 Hits@level+ = [0+] 194 [1+] 102 [2+] 54 [3+] 11 [4+] 6 [5+] 0 Hits/KSLOC@level+ = [0+] 56.7583 [1+] 29.842 [2+] 15.7987 [3+] 3.21826 [4+] 1.75541 [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.