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/gtimer-2.0.0/annotate.c Examining data/gtimer-2.0.0/changelog.c Examining data/gtimer-2.0.0/changelog.h Examining data/gtimer-2.0.0/config.c Examining data/gtimer-2.0.0/config.h Examining data/gtimer-2.0.0/confirm.c Examining data/gtimer-2.0.0/custom-list.c Examining data/gtimer-2.0.0/custom-list.h Examining data/gtimer-2.0.0/edit.c Examining data/gtimer-2.0.0/gettext.h Examining data/gtimer-2.0.0/gtimer.h Examining data/gtimer-2.0.0/gtimeri18n.h Examining data/gtimer-2.0.0/http.c Examining data/gtimer-2.0.0/http.h Examining data/gtimer-2.0.0/project.c Examining data/gtimer-2.0.0/project.h Examining data/gtimer-2.0.0/report.c Examining data/gtimer-2.0.0/task.c Examining data/gtimer-2.0.0/task.h Examining data/gtimer-2.0.0/tcpt.c Examining data/gtimer-2.0.0/tcpt.h Examining data/gtimer-2.0.0/unhide.c Examining data/gtimer-2.0.0/xextras.c Examining data/gtimer-2.0.0/main.c FINAL RESULTS: data/gtimer-2.0.0/annotate.c:141:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "GTimer: %s", gettext("Add Annotation") ); data/gtimer-2.0.0/annotate.c:152:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( str, "%s\n%s", gettext("Enter annotation for"), data/gtimer-2.0.0/changelog.c:97:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "GTimer: %s", gettext ("Change Log") ); data/gtimer-2.0.0/config.c:93:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( attrnames[num_attr], default_config[loop] ); data/gtimer-2.0.0/config.c:96:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( attrvalues[num_attr], default_config[loop+1] ); data/gtimer-2.0.0/config.c:122:9: [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 ( attrvalues[old], ptr ); data/gtimer-2.0.0/config.c:126:9: [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 ( attrnames[num_attr], ptr ); data/gtimer-2.0.0/config.c:131:9: [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 ( attrvalues[num_attr], ptr ); data/gtimer-2.0.0/config.c:205:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( attrvalues[loop], value ); data/gtimer-2.0.0/config.c:214:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( attrnames[num_attr], attribute ); data/gtimer-2.0.0/config.c:216:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( attrvalues[num_attr], value ); data/gtimer-2.0.0/confirm.c:164:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( title2, "GTimer: %s", title ); data/gtimer-2.0.0/edit.c:114:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( ed->p->name, str ); data/gtimer-2.0.0/edit.c:127:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( ptr, str ); data/gtimer-2.0.0/edit.c:189:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "GTimer: %s", gettext ("Edit Project") ); data/gtimer-2.0.0/edit.c:191:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "GTimer: %s", gettext ("Add Project") ); data/gtimer-2.0.0/edit.c:204:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "%s: ", gettext ( "Project name" ) ); data/gtimer-2.0.0/edit.c:315:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( ed->taskdata->task->name, str ); data/gtimer-2.0.0/edit.c:340:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( ptr, str ); data/gtimer-2.0.0/edit.c:406:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "GTimer: %s", gettext ("Edit Task") ); data/gtimer-2.0.0/edit.c:408:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "GTimer: %s", gettext ("Add Task") ); data/gtimer-2.0.0/edit.c:427:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "%s: ", gettext ( "Project " ) ); data/gtimer-2.0.0/edit.c:460:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "%s: ", gettext ( "Task name" ) ); data/gtimer-2.0.0/edit.c:559:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "GTimer: %s", gettext ("Change Browser") ); data/gtimer-2.0.0/edit.c:565:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "%s", "The string \"%s\" in this command, if present, will" data/gtimer-2.0.0/edit.c:580:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "%s: ", gettext ( "Command" ) ); data/gtimer-2.0.0/http.c:122:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( ret, "GTimer/%s", GTIMER_VERSION ); data/gtimer-2.0.0/http.c:237:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( http_proxy, server ); data/gtimer-2.0.0/http.c:281:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( request->request, msg ); data/gtimer-2.0.0/http.c:411:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( http_proxy_string, "http://%s:%d", http_host, port ); data/gtimer-2.0.0/http.c:445:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( http_other_error, tcptErrorString ( ret ) ); data/gtimer-2.0.0/http.c:526:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( temp, "GET %s%s", http_proxy_string, path ); data/gtimer-2.0.0/http.c:528:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( command, temp ); data/gtimer-2.0.0/http.c:539: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 ( command, ret1 ); data/gtimer-2.0.0/http.c:541: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 ( command, ret2 ); data/gtimer-2.0.0/http.c:548: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 ( temp2, user_agent() ); data/gtimer-2.0.0/http.c:552: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 ( temp2, virthost ); data/gtimer-2.0.0/http.c:558: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 ( command, temp2 ); data/gtimer-2.0.0/main.c:912:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( text, data/gtimer-2.0.0/main.c:941:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf ( command, path, GTIMER_URL ); data/gtimer-2.0.0/main.c:943:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( command, "%s %s", path, GTIMER_URL ); data/gtimer-2.0.0/main.c:945:8: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if ( system ( command ) != 0 ) { data/gtimer-2.0.0/main.c:1041:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "%s:\n%s", data/gtimer-2.0.0/main.c:1409:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( temp, "%s %02d:%02d:%02d", data/gtimer-2.0.0/main.c:1723:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( version, "%s (%s)", GTIMER_VERSION, GTIMER_VERSION_DATE ); data/gtimer-2.0.0/main.c:1737:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "%s:\n\n%s\n%s:\n\n%s", data/gtimer-2.0.0/main.c:1778:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg + strlen ( msg ), "%s:\n\n%s", gettext("HTTP Error"), data/gtimer-2.0.0/main.c:1792:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "%s:\n\n%s", gettext("HTTP Error"), data/gtimer-2.0.0/main.c:2192:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( taskdata->last_total, text ); data/gtimer-2.0.0/main.c:2209:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( taskdata->last_today, text ); data/gtimer-2.0.0/main.c:2231:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( today_test, "%s: %d:%02d:%02d", gettext("Today"), h, m, s ); data/gtimer-2.0.0/main.c:2233:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( total_str, today_test ); data/gtimer-2.0.0/main.c:2488:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( ptr, "%s\n%d %s (%s %d:%02d)\n\n", data/gtimer-2.0.0/main.c:2561:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "GTimer v%s", GTIMER_VERSION ); data/gtimer-2.0.0/main.c:2567:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "%s\nGTK Version: %d.%d.%d\n", data/gtimer-2.0.0/main.c:2778:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( taskdir, "%s/%s", home, TASK_DIRECTORY ); data/gtimer-2.0.0/main.c:2785:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( taskdir, "%s/%s", home, ".tasktimer" ); data/gtimer-2.0.0/main.c:2791:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( taskdir, "%s/%s", home, TASK_DIRECTORY ); data/gtimer-2.0.0/main.c:2809:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( localedir, "%s/locale", taskdir ); data/gtimer-2.0.0/main.c:2826:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( gtkrc, "%s/%s", taskdir, "gtkrc" ); data/gtimer-2.0.0/main.c:2842:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( localedir, "%s/locale", taskdir ); data/gtimer-2.0.0/main.c:2854:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( gtkrc, "%s/%s", taskdir, "gtkrc" ); data/gtimer-2.0.0/main.c:2933:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( config_file, "%s/%s", taskdir, CONFIG_DEFAULT_FILE ); data/gtimer-2.0.0/main.c:3104:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "%s GTimer %s", gettext("Welcome to"), data/gtimer-2.0.0/main.c:3161:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( path, "%s:%s", env, path2 ); data/gtimer-2.0.0/main.c:3164:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( path, path2 ); data/gtimer-2.0.0/main.c:3170:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( ret, "%s/%s", ptr, file ); data/gtimer-2.0.0/project.c:129:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( project->name, name ); data/gtimer-2.0.0/project.c:150:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( path, "%s/%d.project", projectdir, project->number ); data/gtimer-2.0.0/project.c:152:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( path, "%s/%d.ann", projectdir, project->number ); data/gtimer-2.0.0/project.c:244:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( path, "%s/%d.project", projectdir, project->number ); data/gtimer-2.0.0/project.c:343:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( newproject->name, ptr ); data/gtimer-2.0.0/project.c:376:20: [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). (void) strcat ( strcpy ( pattern, projectdir ), "/*.project" ); data/gtimer-2.0.0/project.c:380:22: [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). (void) strcat ( strcpy ( path, projectdir ), "/" ); data/gtimer-2.0.0/project.c:382:15: [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). (void) strcpy ( start, fdata.name ); data/gtimer-2.0.0/project.c:408:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( path, "%s/%s", projectdir, entry->d_name ); data/gtimer-2.0.0/project.c:431:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "%s (%d)", gettext("System Error"), errno ); data/gtimer-2.0.0/project.c:436:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "%s(%d)", gettext("Unknown error"), data/gtimer-2.0.0/report.c:280:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( date_time_str, indentation ); data/gtimer-2.0.0/report.c:291:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( padding, date_time_str ); data/gtimer-2.0.0/report.c:297:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( anntext, annotation->text ); data/gtimer-2.0.0/report.c:301:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( newtext, *ptr ); data/gtimer-2.0.0/report.c:314: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 ( newtext, date_time_str ); data/gtimer-2.0.0/report.c:316: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 ( newtext, padding ); data/gtimer-2.0.0/report.c:318: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 ( newtext, p ); data/gtimer-2.0.0/report.c:319: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 ( newtext, newline ); data/gtimer-2.0.0/report.c:378:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "%s %d %s\n%s", gettext ("Error"), data/gtimer-2.0.0/report.c:403:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "GTimer: %s", gettext("Save Report") ); data/gtimer-2.0.0/report.c:441:8: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. fp = popen(ptr,"w"); data/gtimer-2.0.0/report.c:444:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "%s %d %s\n%s", gettext("Error"), data/gtimer-2.0.0/report.c:493:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "GTimer: %s", gettext("Print Report") ); data/gtimer-2.0.0/report.c:508:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "%s: ", gettext("Print Command") ); data/gtimer-2.0.0/report.c:653:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "GTimer: %s", gettext ("Report") ); data/gtimer-2.0.0/report.c:837:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( seltasks[loop]->week_start, daystring ); data/gtimer-2.0.0/report.c:1329:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf ( command, path, tempfile ); data/gtimer-2.0.0/report.c:1331:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( command, "%s %s", path, tempfile ); data/gtimer-2.0.0/report.c:1332:8: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if ( system ( command ) != 0 ) { data/gtimer-2.0.0/report.c:1809:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "GTimer: %s", gettext("Report") ); data/gtimer-2.0.0/task.c:145:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( task->name, name ); data/gtimer-2.0.0/task.c:242:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( path, "%s/%d.task", taskdir, task->number ); data/gtimer-2.0.0/task.c:244:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( path, "%s/%d.ann", taskdir, task->number ); data/gtimer-2.0.0/task.c:336:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( path, "%s/%d.task", taskdir, task->number ); data/gtimer-2.0.0/task.c:458:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( newtask->name, ptr ); data/gtimer-2.0.0/task.c:503:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( annfile, path ); data/gtimer-2.0.0/task.c:525:11: [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 ( a->text, ptr2 ); data/gtimer-2.0.0/task.c:565:20: [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). (void) strcat ( strcpy ( pattern, taskdir ), "/*.task" ); data/gtimer-2.0.0/task.c:569:22: [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). (void) strcat ( strcpy ( path, taskdir ), "/" ); data/gtimer-2.0.0/task.c:571:15: [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). (void) strcpy ( start, fdata.name ); data/gtimer-2.0.0/task.c:597:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( path, "%s/%s", taskdir, entry->d_name ); data/gtimer-2.0.0/task.c:753:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( a->text, text ); data/gtimer-2.0.0/task.c:767:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( path, "%s/%d.ann", taskdir, task->number ); data/gtimer-2.0.0/task.c:771:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( newtext, text ); data/gtimer-2.0.0/tcpt.c:157:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ( socks_server, server ); data/gtimer-2.0.0/tcpt.c:251:9: [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 ( temp + datasize, pw->pw_name ); data/gtimer-2.0.0/unhide.c:220:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf ( msg, "GTimer: %s", gettext("Unhide") ); data/gtimer-2.0.0/main.c:2764:8: [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" ) ) { data/gtimer-2.0.0/main.c:2765:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. home = getenv ( "HOME" ); data/gtimer-2.0.0/main.c:3158:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. env = getenv ( "PATH" ); data/gtimer-2.0.0/report.c:1310:7: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). if (tmpnam(tempfile)) data/gtimer-2.0.0/annotate.c:131: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 *str, msg[100]; data/gtimer-2.0.0/changelog.c:93: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 msg[100]; data/gtimer-2.0.0/config.c:57:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *attrnames[MAX_ATTR]; /* attribute names */ data/gtimer-2.0.0/config.c:58:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *attrvalues[MAX_ATTR]; /* attribute values */ data/gtimer-2.0.0/config.c:91:28: [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. attrnames[num_attr] = (char *) malloc data/gtimer-2.0.0/config.c:94:29: [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. attrvalues[num_attr] = (char *) malloc data/gtimer-2.0.0/config.c:102:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open ( path, O_RDONLY ); data/gtimer-2.0.0/config.c:183:14: [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). *value = atoi ( ptr ); data/gtimer-2.0.0/config.c:231: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 temp[50]; data/gtimer-2.0.0/config.c:232: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 ( temp, "%d", value ); data/gtimer-2.0.0/config.c:248: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). fp = fopen ( attrfile, "w" ); data/gtimer-2.0.0/edit.c:181: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 msg[100], *ptr = NULL; data/gtimer-2.0.0/edit.c:396: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 msg[100], *ptr = NULL; data/gtimer-2.0.0/edit.c:553: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 msg[500], *browser; data/gtimer-2.0.0/gettext.h:195: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 msg_ctxt_id[msgctxt_len + msgid_len]; data/gtimer-2.0.0/gettext.h:197: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 buf[1024]; data/gtimer-2.0.0/gettext.h:205:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); data/gtimer-2.0.0/gettext.h:207:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/gtimer-2.0.0/gettext.h:241: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 msg_ctxt_id[msgctxt_len + msgid_len]; data/gtimer-2.0.0/gettext.h:243: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 buf[1024]; data/gtimer-2.0.0/gettext.h:251:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); data/gtimer-2.0.0/gettext.h:253:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/gtimer-2.0.0/gtimer.h:107: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 last_total[15]; data/gtimer-2.0.0/gtimer.h:109: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 last_today[15]; data/gtimer-2.0.0/http.c:111:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char http_other_error[256]; data/gtimer-2.0.0/http.c:115:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char http_proxy_string[1024]; data/gtimer-2.0.0/http.c:120:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char ret[100]; data/gtimer-2.0.0/http.c:215:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ( ptr2, "%%%02X", (unsigned int)*ptr1 ); data/gtimer-2.0.0/http.c:435:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ( (char *)&server.sin_addr, (char*)hp->h_addr, hp->h_length ); data/gtimer-2.0.0/http.c:521: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 *command, *temp, temp2[256], *ret1, *ret2; data/gtimer-2.0.0/http.c:546: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 ( temp2, " HTTP/1.0\r\n" ); data/gtimer-2.0.0/http.c:547:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat ( temp2, "User-Agent: " ); data/gtimer-2.0.0/http.c:549:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat ( temp2, "\r\n" ); data/gtimer-2.0.0/http.c:551:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat ( temp2, "Host: " ); data/gtimer-2.0.0/http.c:553:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat ( temp2, "\r\n" ); data/gtimer-2.0.0/http.c:555:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat ( temp2, "\r\n" ); data/gtimer-2.0.0/http.c:594: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 data[MAX_READ_SIZE], *alldata, *ptr; data/gtimer-2.0.0/http.c:610:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ( alldata, request->data_read, request->data_len ); data/gtimer-2.0.0/http.c:611:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ( alldata + request->data_len, data, rval ); data/gtimer-2.0.0/http.c:616:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ( alldata, data, rval ); data/gtimer-2.0.0/http.c:643: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). request->content_length = atoi ( ptr + 15 ); data/gtimer-2.0.0/http.c:676:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char msg[200]; data/gtimer-2.0.0/http.c:684:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ( msg, "System error (%d)", errno ); data/gtimer-2.0.0/http.c:687:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ( msg, "System error (%d)", errno ); data/gtimer-2.0.0/http.c:739:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ( ret, ptr, newlen ); data/gtimer-2.0.0/http.c:749:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ( ret, ptr, newlen ); data/gtimer-2.0.0/main.c:222:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char total_str[20]; data/gtimer-2.0.0/main.c:829: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 temp[128]; data/gtimer-2.0.0/main.c:861:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ( temp + strlen ( temp ), "%d", data/gtimer-2.0.0/main.c:910: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 text[1024]; data/gtimer-2.0.0/main.c:917:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat ( text, gettext("Author") ); data/gtimer-2.0.0/main.c:918: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 + strlen ( text ), data/gtimer-2.0.0/main.c:1038: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 msg[500]; data/gtimer-2.0.0/main.c:1103:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (char *)visible_tasks[st] ); data/gtimer-2.0.0/main.c:1399: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 temp[48]; data/gtimer-2.0.0/main.c:1693: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 *ptr, *data2, *msg, version[30]; data/gtimer-2.0.0/main.c:1695: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 timestr[20]; data/gtimer-2.0.0/main.c:1757: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 ( timestr, "%ul", (unsigned int)now ); data/gtimer-2.0.0/main.c:1765: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 msg[400]; data/gtimer-2.0.0/main.c:1775: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 ( msg, data/gtimer-2.0.0/main.c:1777:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat ( msg, "\n\n" ); data/gtimer-2.0.0/main.c:2120: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 text[100]; data/gtimer-2.0.0/main.c:2124: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 *row[4]; data/gtimer-2.0.0/main.c:2126: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 today_test[20]; data/gtimer-2.0.0/main.c:2189:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ( text, "%d:%02d:%02d", h, m, s ); data/gtimer-2.0.0/main.c:2206:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ( text, "%d:%02d:%02d", h, m, s ); data/gtimer-2.0.0/main.c:2247: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 today_str[100], total_str[100]; data/gtimer-2.0.0/main.c:2248: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 *row[4]; data/gtimer-2.0.0/main.c:2340:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ( today_str, "00:00:00" ); data/gtimer-2.0.0/main.c:2342:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ( total_str, "00:00:00" ); data/gtimer-2.0.0/main.c:2363: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 *next_check, now_str[20]; data/gtimer-2.0.0/main.c:2375: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 ( now_str, "%ul", (unsigned int)now ); data/gtimer-2.0.0/main.c:2492:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat ( ptr, gettext("You may now:") ); data/gtimer-2.0.0/main.c:2493:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat ( ptr, "\n\n" ); data/gtimer-2.0.0/main.c:2494:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat ( ptr, gettext("Revert to back to before the idle") ); data/gtimer-2.0.0/main.c:2495:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat ( ptr, "\n\n" ); data/gtimer-2.0.0/main.c:2496:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat ( ptr, gettext("Continue timing, ignoring the idle") ); data/gtimer-2.0.0/main.c:2497:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat ( ptr, "\n\n" ); data/gtimer-2.0.0/main.c:2498:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat ( ptr, gettext("Resume timing from when the idle started") ); data/gtimer-2.0.0/main.c:2532: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 msg[500]; data/gtimer-2.0.0/main.c:2755: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 *matches[100]; data/gtimer-2.0.0/main.c:2758: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 msg[128]; data/gtimer-2.0.0/main.c:2877:18: [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). offset = atoi ( ptr + 1 ); data/gtimer-2.0.0/main.c:2879:18: [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). offset = atoi ( ptr ); data/gtimer-2.0.0/main.c:2904: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). config_start_of_week = atoi ( argv[loop] ); data/gtimer-2.0.0/main.c:3022:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). last_sort = atoi ( ptr ); data/gtimer-2.0.0/main.c:3024: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). sort_forward = ! atoi ( ptr ); data/gtimer-2.0.0/main.c:3065: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). lastTaskNumber = atoi ( ptr2 ); data/gtimer-2.0.0/project.c:246: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). fp = fopen ( path, "w" ); data/gtimer-2.0.0/project.c:307: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 line[512], *ptr, *ptr2, temp[10], *annfile, *anntext; data/gtimer-2.0.0/project.c:311: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). fp = fopen ( path, "r" ); data/gtimer-2.0.0/project.c:376:11: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. (void) strcat ( strcpy ( pattern, projectdir ), "/*.project" ); data/gtimer-2.0.0/project.c:427:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char msg[256]; data/gtimer-2.0.0/project.c:504:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ( ret, project->tasks, sizeof ( Task * ) * project->num_tasks ); data/gtimer-2.0.0/report.c:224: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 week_start[20]; data/gtimer-2.0.0/report.c:275: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 date_time_str[30]; data/gtimer-2.0.0/report.c:276: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 padding[30], *p; data/gtimer-2.0.0/report.c:283:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ( date_time_str + strlen ( date_time_str ), data/gtimer-2.0.0/report.c:288:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ( date_time_str + strlen ( date_time_str ), data/gtimer-2.0.0/report.c:375:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open ( file, O_WRONLY | O_CREAT | O_TRUNC, 0644 ); data/gtimer-2.0.0/report.c:398: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 msg[100]; data/gtimer-2.0.0/report.c:423: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 cmd[500], *ptr, *msg; data/gtimer-2.0.0/report.c:485: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 *ptr, msg[100]; data/gtimer-2.0.0/report.c:631: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 msg[100]; data/gtimer-2.0.0/report.c:802: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 indentation[30]; data/gtimer-2.0.0/report.c:805: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 daystring[20]; data/gtimer-2.0.0/report.c:828:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy ( indentation, " " ); data/gtimer-2.0.0/report.c:830:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy ( indentation, " " ); data/gtimer-2.0.0/report.c:1307: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 tempfile[L_tmpnam]; data/gtimer-2.0.0/report.c:1311:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open ( tempfile, O_WRONLY | O_CREAT | O_EXCL, 0600 ); data/gtimer-2.0.0/report.c:1493:8: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). fp = tmpfile(); data/gtimer-2.0.0/report.c:1784: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 msg[100], temp[512]; data/gtimer-2.0.0/task.c:338: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). fp = fopen ( path, "w" ); data/gtimer-2.0.0/task.c:419: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 line[512], *ptr, *ptr2, temp[10], *annfile, *anntext; data/gtimer-2.0.0/task.c:425: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). fp = fopen ( path, "r" ); data/gtimer-2.0.0/task.c:474: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). entry->year = atoi ( temp ); data/gtimer-2.0.0/task.c:477:22: [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). entry->mon = atoi ( temp ); data/gtimer-2.0.0/task.c:480: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). entry->mday = atoi ( temp ); data/gtimer-2.0.0/task.c:481:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). entry->seconds = atoi ( line + 9 ); data/gtimer-2.0.0/task.c:506:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy ( ptr, ".ann" ); data/gtimer-2.0.0/task.c:508:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open ( annfile, O_RDONLY ); data/gtimer-2.0.0/task.c:522:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). a->text_time = atoi ( ptr ); data/gtimer-2.0.0/task.c:565:11: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. (void) strcat ( strcpy ( pattern, taskdir ), "/*.task" ); data/gtimer-2.0.0/task.c:616:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char msg[256]; data/gtimer-2.0.0/task.c:620:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ( msg, gettext("System Error (%d)"), errno ); data/gtimer-2.0.0/task.c:625:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ( msg, gettext("Unknown error (%d)"), task_error ); data/gtimer-2.0.0/task.c:768: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). fp = fopen ( path, "a+" ); data/gtimer-2.0.0/tcpt.c:96:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char socks_server[256]; data/gtimer-2.0.0/tcpt.c:188: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 temp[100]; data/gtimer-2.0.0/tcpt.c:207:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ( (char *)&data.dst_addr, (char *)&server->sin_addr, hp->h_length ); data/gtimer-2.0.0/tcpt.c:210:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ( (char *)&server->sin_addr, (char*)hp->h_addr, hp->h_length ); data/gtimer-2.0.0/tcpt.c:247:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ( temp, (char *)&data, sizeof ( data ) ); data/gtimer-2.0.0/tcpt.c:249:9: [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 ( temp + datasize, "Unknown user-id %d", (int)uid ); data/gtimer-2.0.0/unhide.c:205: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 msg[100]; data/gtimer-2.0.0/unhide.c:207: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 temp[512]; data/gtimer-2.0.0/annotate.c:95:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(text)) data/gtimer-2.0.0/annotate.c:151: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). str = (char *) malloc ( strlen ( taskdata->task->name ) + 100 ); data/gtimer-2.0.0/changelog.c:128: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). txlen = strlen(changelog_text); data/gtimer-2.0.0/config.c:92:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ( strlen ( default_config[loop] ) + 1 ); data/gtimer-2.0.0/config.c:95:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ( strlen ( default_config[loop+1] ) + 1 ); data/gtimer-2.0.0/config.c:105:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read ( fd, text, buf.st_size ); data/gtimer-2.0.0/config.c:121: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). attrvalues[old] = (char *) malloc ( strlen ( ptr ) + 1 ); data/gtimer-2.0.0/config.c:125: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). attrnames[num_attr] = (char *) malloc ( strlen ( ptr ) + 1 ); data/gtimer-2.0.0/config.c:130:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). attrvalues[num_attr] = (char *) malloc ( strlen ( ptr ) + 1 ); data/gtimer-2.0.0/config.c:204:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). attrvalues[loop] = (char *) malloc ( strlen ( value ) + 1 ); data/gtimer-2.0.0/config.c:213:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). attrnames[num_attr] = (char *) malloc ( strlen ( attribute ) + 1 ); data/gtimer-2.0.0/config.c:215:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). attrvalues[num_attr] = (char *) malloc ( strlen ( value ) + 1 ); data/gtimer-2.0.0/config.c:307: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 ( strncmp ( p, tok, strlen ( tok ) ) == 0 ) { data/gtimer-2.0.0/config.c:309: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). last = p + strlen ( tok ); data/gtimer-2.0.0/confirm.c:163: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). title2 = (char *) malloc ( strlen ( title ) + 10 ); data/gtimer-2.0.0/edit.c:110: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). for ( ptr = str + strlen ( str ) - 1; isspace ( *ptr ) && ptr > str; data/gtimer-2.0.0/edit.c:113: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). ed->p->name = (char *) malloc ( strlen ( str ) + 1 ); data/gtimer-2.0.0/edit.c:126: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). ptr = (char *) malloc ( strlen ( str ) + 1 ); data/gtimer-2.0.0/edit.c:129: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). for ( ptr = str + strlen ( str ) - 1; isspace ( *ptr ) && ptr > str; data/gtimer-2.0.0/edit.c:220:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen ( gettext ("Unnamed Project") ) ); data/gtimer-2.0.0/edit.c:311: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). for ( ptr = str + strlen ( str ) - 1; isspace ( *ptr ) && ptr > str; data/gtimer-2.0.0/edit.c:314: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). ed->taskdata->task->name = (char *) malloc ( strlen ( str ) + 1 ); data/gtimer-2.0.0/edit.c:339: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). ptr = (char *) malloc ( strlen ( str ) + 1 ); data/gtimer-2.0.0/edit.c:342: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). for ( ptr = str + strlen ( str ) - 1; isspace ( *ptr ) && ptr > str; data/gtimer-2.0.0/edit.c:477:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen ( gettext ("Unnamed Task") ) ); data/gtimer-2.0.0/edit.c:595:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen ( "mozilla -raise -remote 'openURL(file:%s)'" ) ); data/gtimer-2.0.0/gettext.h:191: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). size_t msgctxt_len = strlen (msgctxt) + 1; data/gtimer-2.0.0/gettext.h:192:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgid_len = strlen (msgid) + 1; data/gtimer-2.0.0/gettext.h:237: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). size_t msgctxt_len = strlen (msgctxt) + 1; data/gtimer-2.0.0/gettext.h:238:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgid_len = strlen (msgid) + 1; data/gtimer-2.0.0/http.c:195: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). ret = (char *) malloc ( strlen ( str ) * 3 + 1 ); data/gtimer-2.0.0/http.c:236: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). http_proxy = (char *) malloc ( strlen ( server ) + 1 ); data/gtimer-2.0.0/http.c:280: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). request->request = (char *) malloc ( strlen ( msg ) + 1 ); data/gtimer-2.0.0/http.c:318:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen ( request->request ), 0 ); data/gtimer-2.0.0/http.c:406:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( ! http_host || ! strlen ( http_host ) ) data/gtimer-2.0.0/http.c:524: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). temp = (char *) malloc ( strlen ( path ) + strlen ( http_proxy_string ) + data/gtimer-2.0.0/http.c:524: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). temp = (char *) malloc ( strlen ( path ) + strlen ( http_proxy_string ) + data/gtimer-2.0.0/http.c:527: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). command = (char *) malloc ( strlen ( temp ) + 2 ); data/gtimer-2.0.0/http.c:531:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat ( command, "?" ); data/gtimer-2.0.0/http.c:535: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). command = (char *) realloc ( command, strlen ( command ) + data/gtimer-2.0.0/http.c:536:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen ( ret1 ) + strlen ( ret2 ) + 3 ); data/gtimer-2.0.0/http.c:536: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). strlen ( ret1 ) + strlen ( ret2 ) + 3 ); data/gtimer-2.0.0/http.c:538:9: [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 ( command, "&" ); data/gtimer-2.0.0/http.c:540:7: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat ( command, "=" ); data/gtimer-2.0.0/http.c:556: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). command = (char *) realloc ( command, strlen ( command ) + data/gtimer-2.0.0/http.c:557:5: [1] (buffer) strlen: Does not handle 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 ( temp2 ) + 1 ); data/gtimer-2.0.0/http.c:573:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ( a1, str1, len ); data/gtimer-2.0.0/http.c:576:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ( a2, str2, len ); data/gtimer-2.0.0/http.c:635: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). request->gen_callback ( ptr, strlen ( ptr ) ); /* indicates error */ data/gtimer-2.0.0/http.c:728: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 ( text ) < 10 ) data/gtimer-2.0.0/http.c:733:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strncmp ( ptr, end_header1, strlen ( end_header1 ) ) == 0 ) { data/gtimer-2.0.0/http.c:736: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). ptr += strlen ( end_header1 ); data/gtimer-2.0.0/http.c:737: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). newlen = *len - strlen ( text ) - strlen ( end_header1 ); data/gtimer-2.0.0/http.c:737: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). newlen = *len - strlen ( text ) - strlen ( end_header1 ); data/gtimer-2.0.0/http.c:743:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else if ( strncmp ( ptr, end_header2, strlen ( end_header2 ) ) == 0 ) { data/gtimer-2.0.0/http.c:746: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). ptr += strlen ( end_header2 ); data/gtimer-2.0.0/http.c:747: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). newlen = *len - strlen ( text ) - strlen ( end_header2 ); data/gtimer-2.0.0/http.c:747: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). newlen = *len - strlen ( text ) - strlen ( end_header2 ); data/gtimer-2.0.0/http.c:777: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 ( strncmp ( p, tok, strlen ( tok ) ) == 0 ) { data/gtimer-2.0.0/http.c:779: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). last = p + strlen ( tok ); data/gtimer-2.0.0/main.c:859: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). if ( strlen ( temp ) ) data/gtimer-2.0.0/main.c:860:9: [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 ( temp, "," ); data/gtimer-2.0.0/main.c:861: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). sprintf ( temp + strlen ( temp ), "%d", data/gtimer-2.0.0/main.c:918: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). sprintf ( text + strlen ( text ), data/gtimer-2.0.0/main.c:939: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). command = (char *) malloc ( strlen ( path ) + 128 ); data/gtimer-2.0.0/main.c:1703:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ( data2, data, len ); data/gtimer-2.0.0/main.c:1724:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( strncmp ( version, ptr, strlen ( version ) ) == 0 ) { data/gtimer-2.0.0/main.c:1730: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). } else if ( strncmp ( version, ptr, strlen ( version ) ) > 0 ) { data/gtimer-2.0.0/main.c:1736: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). msg = (char *) malloc ( 200 + strlen ( ptr ) ); data/gtimer-2.0.0/main.c:1778: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). sprintf ( msg + strlen ( msg ), "%s:\n\n%s", gettext("HTTP Error"), data/gtimer-2.0.0/main.c:2310:7: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy ( taskdata->last_today, "" ); data/gtimer-2.0.0/main.c:2311:7: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy ( taskdata->last_total, "" ); data/gtimer-2.0.0/main.c:2776: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). taskdir = (char *) malloc ( strlen ( home ) + data/gtimer-2.0.0/main.c:2777:5: [1] (buffer) strlen: Does not handle 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 ( TASK_DIRECTORY ) + 10 ); data/gtimer-2.0.0/main.c:2808:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). localedir = (char *) malloc ( strlen ( taskdir ) + 8 ); data/gtimer-2.0.0/main.c:2824: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). gtkrc = (char *) malloc ( strlen ( taskdir ) + data/gtimer-2.0.0/main.c:2825:5: [1] (buffer) strlen: Does not handle 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 ( "gtkrc" ) + 2 ); data/gtimer-2.0.0/main.c:2841: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). localedir = (char *) malloc ( strlen ( taskdir ) + 8 ); data/gtimer-2.0.0/main.c:2852:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gtkrc = (char *) malloc ( strlen ( taskdir ) + data/gtimer-2.0.0/main.c:2853:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen ( "gtkrc" ) + 2 ); data/gtimer-2.0.0/main.c:2931: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). config_file = (char *) malloc ( strlen ( taskdir ) + data/gtimer-2.0.0/main.c:2932:5: [1] (buffer) strlen: Does not handle 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 ( CONFIG_DEFAULT_FILE ) + 2 ); data/gtimer-2.0.0/main.c:3160: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). path = (char *) malloc ( strlen ( env ) + strlen ( path2 ) + 2 ); data/gtimer-2.0.0/main.c:3160: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). path = (char *) malloc ( strlen ( env ) + strlen ( path2 ) + 2 ); data/gtimer-2.0.0/main.c:3163: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). path = (char *) malloc ( strlen ( path2 ) + 1 ); data/gtimer-2.0.0/main.c:3169: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). ret = (char *) malloc ( strlen ( ptr ) + strlen ( file ) + 2 ); data/gtimer-2.0.0/main.c:3169: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). ret = (char *) malloc ( strlen ( ptr ) + strlen ( file ) + 2 ); data/gtimer-2.0.0/project.c:128: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). project->name = (char *) malloc ( strlen ( name ) + 1 ); data/gtimer-2.0.0/project.c:149: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). path = (char *) malloc ( strlen ( projectdir ) + 10 ); data/gtimer-2.0.0/project.c:243: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). path = (char *) malloc ( strlen ( projectdir ) + 20 ); data/gtimer-2.0.0/project.c:315:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for ( ptr = path + strlen ( path ) - 1; *ptr != '/' && ptr != path; ptr-- ); data/gtimer-2.0.0/project.c:321:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen ( line ); data/gtimer-2.0.0/project.c:335: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 ( line ); data/gtimer-2.0.0/project.c:342:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newproject->name = (char *) malloc ( strlen ( ptr ) + 1 ); data/gtimer-2.0.0/project.c:375: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). pattern = malloc ( strlen ( projectdir ) + 8 ); data/gtimer-2.0.0/project.c:378: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). char *path = malloc ( strlen ( projectdir ) + _MAX_FNAME + 2 ); data/gtimer-2.0.0/project.c:379:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *start = path + strlen ( projectdir ) + 1; data/gtimer-2.0.0/project.c:380:13: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. (void) strcat ( strcpy ( path, projectdir ), "/" ); data/gtimer-2.0.0/project.c:406: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). path = (char *) malloc ( strlen ( projectdir ) + strlen ( entry->d_name ) data/gtimer-2.0.0/project.c:406:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). path = (char *) malloc ( strlen ( projectdir ) + strlen ( entry->d_name ) data/gtimer-2.0.0/report.c:283: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). sprintf ( date_time_str + strlen ( date_time_str ), data/gtimer-2.0.0/report.c:288: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). sprintf ( date_time_str + strlen ( date_time_str ), data/gtimer-2.0.0/report.c:296: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). anntext = (char *) malloc ( strlen ( annotation->text ) + 1 ); data/gtimer-2.0.0/report.c:300:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newtext = (char *) malloc ( strlen ( *ptr ) + 1 ); data/gtimer-2.0.0/report.c:310:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen ( newtext ) + strlen ( p ) + strlen ( padding ) + 2 + data/gtimer-2.0.0/report.c:310: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). strlen ( newtext ) + strlen ( p ) + strlen ( padding ) + 2 + data/gtimer-2.0.0/report.c:310:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen ( newtext ) + strlen ( p ) + strlen ( padding ) + 2 + data/gtimer-2.0.0/report.c:311:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen ( newline ) ); data/gtimer-2.0.0/report.c:377: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). msg = (char *) malloc ( strlen ( file ) + 100 ); data/gtimer-2.0.0/report.c:385: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). write ( fd, drd->text, strlen ( drd->text ) ); data/gtimer-2.0.0/report.c:432:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( ! ptr || ! strlen ( ptr ) ) { data/gtimer-2.0.0/report.c:451: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). fwrite ( drd->text, strlen ( drd->text ), sizeof(char), fp ); data/gtimer-2.0.0/report.c:709: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). txlen = strlen ( text ); data/gtimer-2.0.0/report.c:1320: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). write ( fd, text, strlen ( text ) ); data/gtimer-2.0.0/report.c:1327: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). command = (char *) malloc ( strlen ( path ) + 100 + L_tmpnam ); data/gtimer-2.0.0/task.c:144: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). task->name = (char *) malloc ( strlen ( name ) + 1 ); data/gtimer-2.0.0/task.c:241: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). path = (char *) malloc ( strlen ( taskdir ) + 10 ); data/gtimer-2.0.0/task.c:335: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). path = (char *) malloc ( strlen ( taskdir ) + 10 ); data/gtimer-2.0.0/task.c:429:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for ( ptr = path + strlen ( path ) - 1; *ptr != '/' && ptr != path; ptr-- ); data/gtimer-2.0.0/task.c:435:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen ( line ); data/gtimer-2.0.0/task.c:450: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 ( line ); data/gtimer-2.0.0/task.c:457: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). newtask->name = (char *) malloc ( strlen ( ptr ) + 1 ); data/gtimer-2.0.0/task.c:472:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ( temp, line, 4 ); data/gtimer-2.0.0/task.c:475:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ( temp, line + 4, 2 ); data/gtimer-2.0.0/task.c:478:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ( temp, line + 6, 2 ); data/gtimer-2.0.0/task.c:502: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). annfile = (char *) malloc ( strlen ( path ) + 1 ); data/gtimer-2.0.0/task.c:504: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). ptr = annfile + strlen ( annfile ) - 5; data/gtimer-2.0.0/task.c:510:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read ( fd, anntext, buf.st_size ); data/gtimer-2.0.0/task.c:524: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). a->text = (char *) malloc ( strlen ( ptr2 ) + 1 ); data/gtimer-2.0.0/task.c:564: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). pattern = malloc ( strlen ( taskdir ) + 8 ); data/gtimer-2.0.0/task.c:567: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). char *path = malloc ( strlen ( taskdir ) + _MAX_FNAME + 2 ); data/gtimer-2.0.0/task.c:568:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *start = path + strlen ( taskdir ) + 1; data/gtimer-2.0.0/task.c:569:13: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. (void) strcat ( strcpy ( path, taskdir ), "/" ); data/gtimer-2.0.0/task.c:595: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). path = (char *) malloc ( strlen ( taskdir ) + strlen ( entry->d_name ) data/gtimer-2.0.0/task.c:595:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). path = (char *) malloc ( strlen ( taskdir ) + strlen ( entry->d_name ) data/gtimer-2.0.0/task.c:752: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). a->text = (char *) malloc ( strlen ( text ) + 1 ); data/gtimer-2.0.0/task.c:766: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). path = (char *) malloc ( strlen ( taskdir ) + 10 ); data/gtimer-2.0.0/task.c:770:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newtext = (char *) malloc ( strlen ( text ) + 1 ); data/gtimer-2.0.0/tcpt.c:252: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). datasize += strlen ( temp + datasize ) + 1; ANALYSIS SUMMARY: Hits = 393 Lines analyzed = 11762 in approximately 0.36 seconds (32227 lines/second) Physical Source Lines of Code (SLOC) = 7815 Hits@level = [0] 134 [1] 139 [2] 135 [3] 4 [4] 115 [5] 0 Hits@level+ = [0+] 527 [1+] 393 [2+] 254 [3+] 119 [4+] 115 [5+] 0 Hits/KSLOC@level+ = [0+] 67.4344 [1+] 50.2879 [2+] 32.5016 [3+] 15.2271 [4+] 14.7153 [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.