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/foobillardplus-3.43~svn170+dfsg/contrib/blutooth.c Examining data/foobillardplus-3.43~svn170+dfsg/contrib/collision.c Examining data/foobillardplus-3.43~svn170+dfsg/contrib/double.c.c Examining data/foobillardplus-3.43~svn170+dfsg/contrib/fastexp.c Examining data/foobillardplus-3.43~svn170+dfsg/contrib/fastmath2.c Examining data/foobillardplus-3.43~svn170+dfsg/contrib/fastmath.c Examining data/foobillardplus-3.43~svn170+dfsg/contrib/float.c Examining data/foobillardplus-3.43~svn170+dfsg/contrib/ip1.c Examining data/foobillardplus-3.43~svn170+dfsg/contrib/ip.c Examining data/foobillardplus-3.43~svn170+dfsg/contrib/utf8.c Examining data/foobillardplus-3.43~svn170+dfsg/src/aiplayer.c Examining data/foobillardplus-3.43~svn170+dfsg/src/aiplayer.h Examining data/foobillardplus-3.43~svn170+dfsg/src/ball.c Examining data/foobillardplus-3.43~svn170+dfsg/src/ball.h Examining data/foobillardplus-3.43~svn170+dfsg/src/barchair.h Examining data/foobillardplus-3.43~svn170+dfsg/src/bartable.h Examining data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c Parsing failed to find end of parameter list; semicolon terminated it in (sub_string,"%f %f %f %f %f %f %f %f %f %i %i %i %i", #else sscanf(sub_string,"%lf %lf %lf %lf %lf %lf %lf %lf %lf %i %i %i %i", #endif &balls.ball[i].r.x,&balls.ball[i].r.y,&balls. Parsing failed to find end of parameter list; semicolon terminated it in (net_workstr,"%f %f %f %f %f %f %f %f %f %i %i %i %i :", #else sprintf(net_workstr,"%lf %lf %lf %lf %lf %lf %lf %lf %lf %i %i %i %i :", #endif balls.ball[i].r.x,balls.ball[i].r.y,bal Examining data/foobillardplus-3.43~svn170+dfsg/src/billard3d.h Examining data/foobillardplus-3.43~svn170+dfsg/src/billard.c Examining data/foobillardplus-3.43~svn170+dfsg/src/billard.h Examining data/foobillardplus-3.43~svn170+dfsg/src/billmove.c Examining data/foobillardplus-3.43~svn170+dfsg/src/billmove.h Examining data/foobillardplus-3.43~svn170+dfsg/src/bottle.c Examining data/foobillardplus-3.43~svn170+dfsg/src/bottle.h Examining data/foobillardplus-3.43~svn170+dfsg/src/bumpref.c Examining data/foobillardplus-3.43~svn170+dfsg/src/bumpref.h Examining data/foobillardplus-3.43~svn170+dfsg/src/burlap_sofa.h Examining data/foobillardplus-3.43~svn170+dfsg/src/cartoonguy.c Examining data/foobillardplus-3.43~svn170+dfsg/src/cartoonguy.h Examining data/foobillardplus-3.43~svn170+dfsg/src/ceilinglamp_high.c Examining data/foobillardplus-3.43~svn170+dfsg/src/ceilinglamp_high.h Examining data/foobillardplus-3.43~svn170+dfsg/src/Ceiling_light.h Examining data/foobillardplus-3.43~svn170+dfsg/src/chess.c Examining data/foobillardplus-3.43~svn170+dfsg/src/chess.h Examining data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c Examining data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.h Examining data/foobillardplus-3.43~svn170+dfsg/src/fire.c Examining data/foobillardplus-3.43~svn170+dfsg/src/fire.h Examining data/foobillardplus-3.43~svn170+dfsg/src/fireplace.h Examining data/foobillardplus-3.43~svn170+dfsg/src/fireplace_high.c Examining data/foobillardplus-3.43~svn170+dfsg/src/fireplace_high.h Examining data/foobillardplus-3.43~svn170+dfsg/src/flower.c Examining data/foobillardplus-3.43~svn170+dfsg/src/flower.h Examining data/foobillardplus-3.43~svn170+dfsg/src/font.c Examining data/foobillardplus-3.43~svn170+dfsg/src/font.h Examining data/foobillardplus-3.43~svn170+dfsg/src/getopt_long.c Examining data/foobillardplus-3.43~svn170+dfsg/src/getopt_long.h Examining data/foobillardplus-3.43~svn170+dfsg/src/helpscreen.c Examining data/foobillardplus-3.43~svn170+dfsg/src/helpscreen.h Examining data/foobillardplus-3.43~svn170+dfsg/src/history.h Examining data/foobillardplus-3.43~svn170+dfsg/src/language.c Examining data/foobillardplus-3.43~svn170+dfsg/src/language.h Examining data/foobillardplus-3.43~svn170+dfsg/src/menu.c Examining data/foobillardplus-3.43~svn170+dfsg/src/menu.h Examining data/foobillardplus-3.43~svn170+dfsg/src/mesh.c Examining data/foobillardplus-3.43~svn170+dfsg/src/mesh.h Examining data/foobillardplus-3.43~svn170+dfsg/src/net_socket.c Examining data/foobillardplus-3.43~svn170+dfsg/src/net_socket.h Examining data/foobillardplus-3.43~svn170+dfsg/src/options.c Examining data/foobillardplus-3.43~svn170+dfsg/src/options.h Examining data/foobillardplus-3.43~svn170+dfsg/src/player.h Examining data/foobillardplus-3.43~svn170+dfsg/src/png_loader.c Examining data/foobillardplus-3.43~svn170+dfsg/src/png_loader.h Examining data/foobillardplus-3.43~svn170+dfsg/src/queue.c Examining data/foobillardplus-3.43~svn170+dfsg/src/queue.h Examining data/foobillardplus-3.43~svn170+dfsg/src/room.c Examining data/foobillardplus-3.43~svn170+dfsg/src/room.h Examining data/foobillardplus-3.43~svn170+dfsg/src/sittingboy.c Examining data/foobillardplus-3.43~svn170+dfsg/src/sittingboy.h Examining data/foobillardplus-3.43~svn170+dfsg/src/sound_stuff.c Examining data/foobillardplus-3.43~svn170+dfsg/src/sound_stuff.h Examining data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c Examining data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.h Examining data/foobillardplus-3.43~svn170+dfsg/src/table.c Examining data/foobillardplus-3.43~svn170+dfsg/src/table.h Examining data/foobillardplus-3.43~svn170+dfsg/src/textobj.c Examining data/foobillardplus-3.43~svn170+dfsg/src/textobj.h Examining data/foobillardplus-3.43~svn170+dfsg/src/vmath.c Examining data/foobillardplus-3.43~svn170+dfsg/src/vmath.h Examining data/foobillardplus-3.43~svn170+dfsg/src/history.c FINAL RESULTS: data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:936:13: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. if (readlink(proc_exe, data_dir, sizeof(data_dir)) < 0) { data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:529:9: [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(net_data,net_workstr); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1467:12: [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(options_net_hostname,optarg); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1483:12: [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(options_browser,optarg); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1809: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(win_helptext,helptext[0]); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1812:9: [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(win_helptext,opt[i].name); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1814:9: [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(win_helptext,opt[i].has_arg?"<arg> : ":" : "); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1815:9: [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(win_helptext,helptext[i]); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1819:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(localeText[51],appname); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1845:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename,"%s\\.foobillardrc",getenv("USERPROFILE")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1847:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename,"%s/Library/Preferences/org.foobillard.Foobillard--",getenv("HOME")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1849:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename,"%s/.foobillardrc",getenv("HOME")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1924:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename,"%s\\.foobillardrc",getenv("USERPROFILE")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1926:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename,"%s/Library/Preferences/org.foobillard.Foobillard--",getenv("HOME")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1928:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename,"%s/.foobillardrc",getenv("HOME")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2450: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(player->name,src.name); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2476: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(player->name,ai?localeText[55]:localeText[56]); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2546:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[57],i-13); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2547:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(roster->player[i].name,str); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2550:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(roster->player[i].name,playername[i]); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2571: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(roster->player[0].name,getenv("USERNAME")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2572: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(player[0].name,getenv("USERNAME")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2575: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(roster->player[0].name,getenv("USER")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2576: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(player[0].name,getenv("USER")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:3959:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(newTournText[i],localeText[59],i+1); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:4344:18: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf( str, localeText[176], minballnr ); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:5920:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(statusstr,localeText[175],options_maxp_carambol); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6542:11: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(st_string,localeText[428],options_snd_volume); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6550:11: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(st_string,localeText[428],options_snd_volume); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6559:11: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(st_string,localeText[427],options_mus_volume); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6568:11: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(st_string,localeText[427],options_mus_volume); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6874:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(net_data,"%i %i %f %i %s %s",options_jump_shots,gametype,options_table_size,options_maxp_carambol,name1,name2); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6876:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(net_data,"%i %i %lf %i %s %s",options_jump_shots,gametype,options_table_size,options_maxp_carambol,name1,name2); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6979:5: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(net_data,"%i %i %f %i %s %s",&options_jump_shots,(int *)&gametype,&options_table_size,&options_maxp_carambol,name1,name2); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6981:5: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(net_data,"%i %i %lf %i %s %s",&options_jump_shots,(int *)&gametype,&options_table_size,&options_maxp_carambol,name1,name2); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:7112:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(host_info,"Host: %s",get_hostname()); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:7600:6: [4] (shell) execl: 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. execl(get_prog(),appname_str,(char *)0); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:7610: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(player[0].name,(char *)arg); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:7615: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(player[1].name,(char *)arg); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:7727: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(options_browser,(char *)arg); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:7764: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(options_net_hostname,(char *)arg); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:8106:8: [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(human_player_roster.player[1].name,localeText[1]); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:8107:8: [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(human_player_roster.player[1].name,localeText[1]); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:8110:8: [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(human_player_roster.player[0].name,localeText[0]); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:8111:8: [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(human_player_roster.player[0].name,localeText[0]); data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:260:15: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(statusstr,localeText[192],player[act_player].name); data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:264:15: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(statusstr,localeText[193],act_player+1); data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:379:15: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(statusstr,localeText[192],player[act_player].name); data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:383:15: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(statusstr,localeText[193],act_player+1); data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:492:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(statusstr,localeText[192],player[act_player].name); data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:496:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(statusstr,localeText[193],act_player+1); data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:674:11: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(statusstr,localeText[206],localeText[st.to_play+177]); data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:679:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(statusstr,localeText[207],localeText[st.to_play+176]); data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:707:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(statusstr,localeText[192],player[act_player].name); data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:711:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(statusstr,localeText[193],act_player+1); data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:820: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(workstring1, concattext ); data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:823: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(workstring2, concattext ); data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:871:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( nextcolor, "%+04d %s", pscore, localeText[177+st.to_play]); data/foobillardplus-3.43~svn170+dfsg/src/history.c:74: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(strpointer,file_name); data/foobillardplus-3.43~svn170+dfsg/src/history.c:85:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(file,"%s/html/%s",file_name,filecheck); data/foobillardplus-3.43~svn170+dfsg/src/history.c:97:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(workstring,"%s/html/%s",file_name,historyfile); data/foobillardplus-3.43~svn170+dfsg/src/history.c:105:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(workstring,"%s/html/%s",file_name,historyfile); data/foobillardplus-3.43~svn170+dfsg/src/history.c:109:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(workstring," %s%s/html/%s",callstring,file_name,historyfile); data/foobillardplus-3.43~svn170+dfsg/src/history.c:145:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(historyfile,"%s/html/%s",file_name,"tournament.xml"); data/foobillardplus-3.43~svn170+dfsg/src/history.c:146:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(newfile,"%s/html/%s",file_name,"tournament.tmp"); data/foobillardplus-3.43~svn170+dfsg/src/history.c:251:14: [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(checkstring,buffer); data/foobillardplus-3.43~svn170+dfsg/src/history.c:276:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(file_name,getenv("USERPROFILE")); data/foobillardplus-3.43~svn170+dfsg/src/history.c:280:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(file_name,getenv("HOME")); data/foobillardplus-3.43~svn170+dfsg/src/history.c:284:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(file_name,getenv("HOME")); data/foobillardplus-3.43~svn170+dfsg/src/history.c:294:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(directorycheck,"%s/html",file_name); data/foobillardplus-3.43~svn170+dfsg/src/history.c:296:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(directorycheck1,"%s/html/images",file_name); data/foobillardplus-3.43~svn170+dfsg/src/history.c:299:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(directorycheck,"%s/html",file_name); data/foobillardplus-3.43~svn170+dfsg/src/history.c:301:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(directorycheck1,"%s/html/images",file_name); data/foobillardplus-3.43~svn170+dfsg/src/history.c:306:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(copy_file,"%s/%s",directorycheck,"history.xsl"); data/foobillardplus-3.43~svn170+dfsg/src/history.c:308:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(copy_file,"%s/%s",directorycheck,"history.xml"); data/foobillardplus-3.43~svn170+dfsg/src/history.c:312:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(copy_file,"%s/%s",directorycheck,"tournament.xsl"); data/foobillardplus-3.43~svn170+dfsg/src/history.c:314:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(copy_file,"%s/%s",directorycheck,"tournament.xml"); data/foobillardplus-3.43~svn170+dfsg/src/history.c:317:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(copy_file,"%s/%s",directorycheck,"styles.css"); data/foobillardplus-3.43~svn170+dfsg/src/history.c:321:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(copy_file,"%s/%s",directorycheck1,filenames[i]); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:113: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( menu->entry[menu->nr].text, text); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:129:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( menu->entry[menu->nr].settingtext, subtext); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:146: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( menu->entry[menu->nr].text, text ); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:170: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( menu->entry[menu->nr].text, text ); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:195: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( menu->entry[menu->nr].text, text ); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:219: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( menu->entry[menu->nr].text, text ); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:249: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( menu->entry[menu->nr].text, text ); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:270: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( entry->settingtext, text ); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:273:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str,"%s : %s",entry->text,entry->settingtext); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:292:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str,"%s : %s",entry->text,entry->settingtext); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:464:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy((*menu)->entry[(*menu)->select_index].text, data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1301:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[122],player[0].name); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1304:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[123],player[1].name); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1307:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[124],options_net_portnum); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1319:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[124],options_net_portnum); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1322:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[126],options_net_hostname); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1369:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[122],player[0].name); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1372:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[123],player[1].name); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1375:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[124],options_net_portnum); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1387:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[124],options_net_portnum); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1390:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[126],options_net_hostname); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1436:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[122],player[0].name); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1439:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[123],player[1].name); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1442:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[124],options_net_portnum); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1454:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[124],options_net_portnum); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1457:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[126],options_net_hostname); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1485:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[213],options_maxp_carambol); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1506:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[122],player[0].name); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1509:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[123],player[1].name); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1512:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[124],options_net_portnum); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1524:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[124],options_net_portnum); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1527:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[126],options_net_hostname); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1700:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[19],options_browser); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1715:10: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[232],maxi); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1832:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[122],player[0].name); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:1862:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str,localeText[123],player[1].name); data/foobillardplus-3.43~svn170+dfsg/src/net_socket.c:115:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(ipanswer,"IPv4: %s",buf); data/foobillardplus-3.43~svn170+dfsg/src/net_socket.c:128:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(ipanswer,"IPv6: %s",buf); data/foobillardplus-3.43~svn170+dfsg/src/net_socket.c:165:6: [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(ip_adresses,ipstring); data/foobillardplus-3.43~svn170+dfsg/src/png_loader.c:171: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(file_name,randomname); data/foobillardplus-3.43~svn170+dfsg/src/png_loader.c:209: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(file_name,randomname); data/foobillardplus-3.43~svn170+dfsg/src/sound_stuff.c:101: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(s,&s[strlen(s)-4]); data/foobillardplus-3.43~svn170+dfsg/src/sound_stuff.c:159:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(playfile,"music/%s",musicfile[shufflesong[actualsong]]); data/foobillardplus-3.43~svn170+dfsg/src/sound_stuff.c:283:14: [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(musicfile[i++],dp->d_name); data/foobillardplus-3.43~svn170+dfsg/src/sound_stuff.c:290:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(playfile,"music/%s",musicfile[0]); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:79:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer+(ch-st), "%s%s", repl, ch+strlen(orig)); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:122: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,getenv("PATH")); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:161:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(message,sizeof(message),error_message,error_extend); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:194:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(newmessage,sizeof(newmessage),dialog_prog[dialog],message); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:195:5: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(newmessage); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:261:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(browser,"%s file://",options_browser); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:271: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(strpointer,browser); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:1025:5: [4] (shell) ShellExecute: 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. ShellExecute(NULL,"open",command,NULL,NULL,SW_SHOWNORMAL); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:1028:12: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. return system(command); data/foobillardplus-3.43~svn170+dfsg/src/textobj.c:100: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(obj->str,str); data/foobillardplus-3.43~svn170+dfsg/src/textobj.c:101: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(obj->fontname,fontname); data/foobillardplus-3.43~svn170+dfsg/src/textobj.c:115: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(obj->str,str); data/foobillardplus-3.43~svn170+dfsg/src/textobj.c:116: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(obj->fontname,fontname); data/foobillardplus-3.43~svn170+dfsg/src/textobj.c:137:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(obj->str,str); data/foobillardplus-3.43~svn170+dfsg/src/textobj.c:144:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(obj->str,str); data/foobillardplus-3.43~svn170+dfsg/src/textobj.c:156: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(str,obj->str); data/foobillardplus-3.43~svn170+dfsg/src/textobj.c:168: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(str,obj->str); data/foobillardplus-3.43~svn170+dfsg/src/textobj.c:184: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(obj->fontname,fontname); data/foobillardplus-3.43~svn170+dfsg/src/textobj.c:189: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(obj->fontname,fontname); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1845:42: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. sprintf(filename,"%s\\.foobillardrc",getenv("USERPROFILE")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1847:75: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. sprintf(filename,"%s/Library/Preferences/org.foobillard.Foobillard--",getenv("HOME")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1849:41: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. sprintf(filename,"%s/.foobillardrc",getenv("HOME")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1924:42: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. sprintf(filename,"%s\\.foobillardrc",getenv("USERPROFILE")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1926:75: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. sprintf(filename,"%s/Library/Preferences/org.foobillard.Foobillard--",getenv("HOME")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1928:41: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. sprintf(filename,"%s/.foobillardrc",getenv("HOME")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2570: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("USERNAME")) data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2571:39: [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. strcpy(roster->player[0].name,getenv("USERNAME")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2572:31: [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. strcpy(player[0].name,getenv("USERNAME")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2574: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("USER")) data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2575:39: [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. strcpy(roster->player[0].name,getenv("USER")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2576:31: [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. strcpy(player[0].name,getenv("USER")); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:8123:4: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(SDL_GetTicks()); data/foobillardplus-3.43~svn170+dfsg/src/getopt_long.c:92:10: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. return getopt(argc,argv,optstring); data/foobillardplus-3.43~svn170+dfsg/src/history.c:276:21: [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. strcpy(file_name,getenv("USERPROFILE")); data/foobillardplus-3.43~svn170+dfsg/src/history.c:280:21: [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. strcpy(file_name,getenv("HOME")); data/foobillardplus-3.43~svn170+dfsg/src/history.c:284:21: [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. strcpy(file_name,getenv("HOME")); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:122:17: [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. strcpy(path,getenv("PATH")); data/foobillardplus-3.43~svn170+dfsg/contrib/blutooth.c:23:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char addr[19] = { 0 }; data/foobillardplus-3.43~svn170+dfsg/contrib/blutooth.c:24:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[248] = { 0 }; data/foobillardplus-3.43~svn170+dfsg/contrib/blutooth.c:46:9: [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(name, "[unknown]"); data/foobillardplus-3.43~svn170+dfsg/contrib/fastexp.c:1431:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[1024]; data/foobillardplus-3.43~svn170+dfsg/contrib/ip.c:42:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ip[INET_ADDRSTRLEN]; data/foobillardplus-3.43~svn170+dfsg/contrib/ip1.c:24: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[64]; data/foobillardplus-3.43~svn170+dfsg/contrib/utf8.c:26:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char versuch[100] = "abcdefghijklmnopqrstuvwxyzäöüßÄÖÜ"; data/foobillardplus-3.43~svn170+dfsg/src/ball.c:55: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 * balltexdata[22]; data/foobillardplus-3.43~svn170+dfsg/src/ball.c:475:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[80]; data/foobillardplus-3.43~svn170+dfsg/src/ball.c:537: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(str,"%d",nr); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:280: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 net_data[5000]; // all data send as a string for 32/64 Bit, Win/Linux compatibility data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:281: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 net_workstr[5000]; // network work string for building the next ip-packets data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:286: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 *ipptr[9]; // pointer to ip_adresses, max. 9 data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:316: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 stbar_text[6]; // format the value for output to string data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:398: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 st_string[70]; // output Volume on statusline data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:522: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(net_workstr,"%f %f %f %f %f %f %f %f %f %i %i %i %i :", data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:524: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(net_workstr,"%lf %lf %lf %lf %lf %lf %lf %lf %lf %i %i %i %i :", data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:533: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(net_workstr,"%i %f %f %f %f %f %f %i",netorder,Xque,Zque,player[act_player].cue_x,player[act_player].cue_y,player[act_player].strength,queue_offs_sik,(int)data_len); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:536: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(net_workstr,"%i %lf %lf %lf %lf %lf %lf %i",netorder,Xque,Zque,player[act_player].cue_x,player[act_player].cue_y,player[act_player].strength,queue_offs_sik,(int)data_len); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1808:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char win_helptext[10000]; data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1811:9: [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(win_helptext,"\n--"); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1838:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char allstr[20000]; // place for the whole config-file data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1839:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename[300]; // config-filename with path data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1852:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if( (f=fopen(filename,"rb")) != NULL ){ data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1904:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char argstr[256]; data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1920:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename[512]; data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1921:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[256]; data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1930:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((f=fopen(filename,"wb"))==NULL){ data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1998:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"%f",options_table_size/0.3048); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2017:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"%f",human_player_roster.player[0].err); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2021:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"%f",human_player_roster.player[1].err); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2066:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"%d",options_net_portnum); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2071:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"%dx%d",win_width,win_height); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2097:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"%d", options_cuberef_res); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2135:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"%f",options_tourfast); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2148:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"%d",options_maxfsaa); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2162:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"%d", options_snd_volume); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2166:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"%d", options_mus_volume); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2171:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"%d", options_maxp_carambol); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2181:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"%d",options_fsaa_value); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2186:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"%d",options_net_speed); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2194:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"%f",options_value_anisotrop); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2201:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"%d",options_furniture); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:2499:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[256]; data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:3953:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char newTournText[TOURNAMENT_ROUND_NUM][200]; data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:4097: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[256]; // for string operations and network countdown data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:4350:18: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf( str, "%+04d", player[i].score ); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:5390:12: [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(stbar_text,"%03u%%",(unsigned int)(queue_strength*100)); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:5779: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(str,"%01u:%02u",wait_seconds/60,wait_seconds%60); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:5888:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char statusstr[100]; // make a better statusline data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6800:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name1[256],name2[256]; data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6811: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(net_data,"42"); //testing connection data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6824:8: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if(atoi(net_data)!=7) { data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6837:8: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if(atoi(net_data)!=1) { data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6839:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if(atoi(net_data)!=0) { data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6845: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(net_data,"%i",options_net_speed); //Send server network speed data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6853: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(net_data,"%i",options_net_compatible); //Send server network mode data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6904:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name1[256],name2[256]; data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6919:8: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if(atoi(net_data)!=42) { data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6931: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(net_data,"%u",(unsigned int)sizeof(VMfloat)); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6947:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). options_net_speed = atoi(net_data); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6957: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). options_net_compatible = atoi(net_data); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:7075:6: [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 host_info[300]; data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:7273:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). options_maxp_carambol = atoi((char*)arg); data/foobillardplus-3.43~svn170+dfsg/src/billmove.c:1010: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( newpath, pball->path, pball->pathcnt*sizeof(VMvect) ); data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:82: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 emptystring[256] = "\0"; // for initializing a whole empty string data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:83: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 workstring1[256] = "\0"; // workstring for the next 1. statusline data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:84: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 workstring2[256] = "\0"; // workstring for the 2. optinal statusline data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:102:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char statusstr[200]; // make a better statusline data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:291:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char statusstr[200]; // make a better statusline data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:407:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char statusstr[200]; // make a better statusline data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:531:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char statusstr[200]; // make a better statusline data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:869: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( nextcolor, "%+04d", pscore); data/foobillardplus-3.43~svn170+dfsg/src/fire.c:44:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char firename[20]; data/foobillardplus-3.43~svn170+dfsg/src/fire.c:50:8: [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(firename,"fire%i.png",fireindex); data/foobillardplus-3.43~svn170+dfsg/src/history.c:43: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 file_name[512]; data/foobillardplus-3.43~svn170+dfsg/src/history.c:83:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char file[1024]; data/foobillardplus-3.43~svn170+dfsg/src/history.c:94:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char workstring[1024]; data/foobillardplus-3.43~svn170+dfsg/src/history.c:107:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char callstring[1024]; data/foobillardplus-3.43~svn170+dfsg/src/history.c:125:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char historyfile[1024]; // no file with directory should be longer data/foobillardplus-3.43~svn170+dfsg/src/history.c:126:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char newfile[1024]; // no file with directory should be longer data/foobillardplus-3.43~svn170+dfsg/src/history.c:127:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char checkstring[2048]; // no entry inside the history-file should be longer data/foobillardplus-3.43~svn170+dfsg/src/history.c:128:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char datestring[25]; data/foobillardplus-3.43~svn170+dfsg/src/history.c:129:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char gameid[200]; data/foobillardplus-3.43~svn170+dfsg/src/history.c:147:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((fp=fopen(historyfile,"r"))) { data/foobillardplus-3.43~svn170+dfsg/src/history.c:148:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((wfp=fopen(newfile,"w+"))) { data/foobillardplus-3.43~svn170+dfsg/src/history.c:193:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char historyfile[1024]; // no file with directory should be longer data/foobillardplus-3.43~svn170+dfsg/src/history.c:194:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char newfile[1024]; // no file with directory should be longer data/foobillardplus-3.43~svn170+dfsg/src/history.c:195:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char checkstring[2048]; // no entry inside the history-file should be longer data/foobillardplus-3.43~svn170+dfsg/src/history.c:196:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char datestring[25]; data/foobillardplus-3.43~svn170+dfsg/src/history.c:208:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((fp=fopen(historyfile,"r"))) { data/foobillardplus-3.43~svn170+dfsg/src/history.c:209:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((wfp=fopen(newfile,"w+"))) { data/foobillardplus-3.43~svn170+dfsg/src/history.c:243:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char checkstring[2048]; // no entry inside the history-file should be longer data/foobillardplus-3.43~svn170+dfsg/src/history.c:246:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((fp=fopen(inputfile,"r"))) { data/foobillardplus-3.43~svn170+dfsg/src/history.c:247:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((wfp=fopen(outputfile,"w+"))) { data/foobillardplus-3.43~svn170+dfsg/src/history.c:270:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char directorycheck[1024]; data/foobillardplus-3.43~svn170+dfsg/src/history.c:271:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char directorycheck1[1024]; data/foobillardplus-3.43~svn170+dfsg/src/history.c:272:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char copy_file[1024]; data/foobillardplus-3.43~svn170+dfsg/src/history.c:277:4: [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(file_name,"/Desktop/foobillardplus-data"); data/foobillardplus-3.43~svn170+dfsg/src/history.c:281:4: [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(file_name,"/Library/Application Support/Foobillard++"); data/foobillardplus-3.43~svn170+dfsg/src/history.c:285:4: [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(file_name,"/.foobillardplus"); data/foobillardplus-3.43~svn170+dfsg/src/language.c:35:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char localeText[MAX_TEXT_ENTRIES][MAX_TEXT_ENTRY_LEN]; data/foobillardplus-3.43~svn170+dfsg/src/language.c:38: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 charlang[3]; // system locale code data/foobillardplus-3.43~svn170+dfsg/src/language.c:88:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char full_path[512]; data/foobillardplus-3.43~svn170+dfsg/src/language.c:89:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char exe_path[512] = "locale/"; data/foobillardplus-3.43~svn170+dfsg/src/language.c:97: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(exe_path,"\\data\\locale\\"); data/foobillardplus-3.43~svn170+dfsg/src/language.c:123:29: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (language_file) fp = fopen(language_file, "r"); data/foobillardplus-3.43~svn170+dfsg/src/language.c:167:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char command[512]; data/foobillardplus-3.43~svn170+dfsg/src/language.c:197:17: [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(options_browser, "./browser.sh"); data/foobillardplus-3.43~svn170+dfsg/src/language.h:28:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char localeText[MAX_TEXT_ENTRIES][MAX_TEXT_ENTRY_LEN]; data/foobillardplus-3.43~svn170+dfsg/src/menu.c:63:6: [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[64]; data/foobillardplus-3.43~svn170+dfsg/src/menu.c:64:6: [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(buf,"%u.%u.%u.%u",n1,n2,n3,n4); data/foobillardplus-3.43~svn170+dfsg/src/menu.c:269:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[256]; data/foobillardplus-3.43~svn170+dfsg/src/menu.c:287:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[256]; data/foobillardplus-3.43~svn170+dfsg/src/menu.c:443:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if( atoi((*menu)->entry[(*menu)->select_index].arg) < (*menu)->entry[(*menu)->select_index].minvalue || atoi((*menu)->entry[(*menu)->select_index].arg) > (*menu)->entry[(*menu)->select_index].maxvalue) { data/foobillardplus-3.43~svn170+dfsg/src/menu.c:443:121: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if( atoi((*menu)->entry[(*menu)->select_index].arg) < (*menu)->entry[(*menu)->select_index].minvalue || atoi((*menu)->entry[(*menu)->select_index].arg) > (*menu)->entry[(*menu)->select_index].maxvalue) { data/foobillardplus-3.43~svn170+dfsg/src/menu.c:751:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[256]; data/foobillardplus-3.43~svn170+dfsg/src/menu.c:931:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf( str, "%dx%d", modes[i].w, modes[i].h ); data/foobillardplus-3.43~svn170+dfsg/src/menu.h:56:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char text[256]; data/foobillardplus-3.43~svn170+dfsg/src/menu.h:57:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char settingtext[256]; data/foobillardplus-3.43~svn170+dfsg/src/net_socket.c:103: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[64]; data/foobillardplus-3.43~svn170+dfsg/src/net_socket.c:104: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 ipanswer[80]; data/foobillardplus-3.43~svn170+dfsg/src/net_socket.c:147:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char ip_adresses[4096]; data/foobillardplus-3.43~svn170+dfsg/src/net_socket.c:184:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char szHostName[255]; data/foobillardplus-3.43~svn170+dfsg/src/options.c:126:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char options_net_hostname[1024] = "192.168.1.1"; // default initialized for network game data/foobillardplus-3.43~svn170+dfsg/src/options.c:127:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char options_language [3] = "00"; // language, 00 = uninitialized data/foobillardplus-3.43~svn170+dfsg/src/options.c:182:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char options_browser[20] = "firefox"; // the variable to hold the standard Browser for the Manual data/foobillardplus-3.43~svn170+dfsg/src/options.h:120:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char options_language [3]; // language, 00 = uninitialized data/foobillardplus-3.43~svn170+dfsg/src/options.h:164:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char options_browser[20]; // the variable to hold the standard Browser for the Manual data/foobillardplus-3.43~svn170+dfsg/src/player.h:42:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[256]; data/foobillardplus-3.43~svn170+dfsg/src/png_loader.c:73:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(file_name, "rb"); data/foobillardplus-3.43~svn170+dfsg/src/png_loader.c:158:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char file_name[1024]; data/foobillardplus-3.43~svn170+dfsg/src/png_loader.c:159:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char randomname[200]; data/foobillardplus-3.43~svn170+dfsg/src/png_loader.c:170: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(randomname,"/screen-%i.bmp",rand()); data/foobillardplus-3.43~svn170+dfsg/src/png_loader.c:186:10: [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 *) temp->pixels) + temp->pitch * i, pixels + 3*width * (height-i-1), width*3); data/foobillardplus-3.43~svn170+dfsg/src/png_loader.c:208: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(randomname,"/screen-%i.png",rand()); data/foobillardplus-3.43~svn170+dfsg/src/png_loader.c:211:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((fp = fopen(file_name, "wb"))==NULL) { data/foobillardplus-3.43~svn170+dfsg/src/sound_stuff.c:53:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char musicfile[500][255]; data/foobillardplus-3.43~svn170+dfsg/src/sound_stuff.c:54:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char playfile[300]; data/foobillardplus-3.43~svn170+dfsg/src/sound_stuff.c:99:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[10]; data/foobillardplus-3.43~svn170+dfsg/src/sound_stuff.c:203:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((f=fopen("ball_ball.raw", "rb"))==NULL){ data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:59: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 browser[256]; data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:73: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 buffer[2048]; data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:88: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 *pointers[512]; data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:117:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[2048]; data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:118:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char file[1024]; data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:158:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char message[2048]; data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:191: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 newmessage[2048]; data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:211:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((from = fopen(filefrom, "rb"))==NULL) { data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:217:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((to = fopen(fileto, "wb"))==NULL) { data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:256: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(browser,"\\data\\"); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:259: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(options_browser,"./browser.sh"); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:911: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 data_dir[512]; data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:912: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 exe_prog[512]; data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:918:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char proc_exe[20]; data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:1012:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen(path, "r"); data/foobillardplus-3.43~svn170+dfsg/src/textobj.c:154:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[256]; data/foobillardplus-3.43~svn170+dfsg/src/textobj.c:166:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[256]; data/foobillardplus-3.43~svn170+dfsg/src/textobj.h:45:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[256]; data/foobillardplus-3.43~svn170+dfsg/src/textobj.h:46:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fontname[256]; data/foobillardplus-3.43~svn170+dfsg/contrib/utf8.c:62: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). printf("Output length with strlen: %i\n",strlen(versuch)); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:531:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). data_len = strlen(net_data); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1319:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(options_language,optarg,sizeof(options_language)); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1813: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(win_helptext," "); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:1855:27: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for( i=2 ; (c=fgetc(f))!='\n' && c!=EOF ; i++ ){ data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:6924:5: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(net_data,"7"); // answer the server data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:7129:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(options_language,"de", sizeof(options_language)); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:7132:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(options_language,"en", sizeof(options_language)); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:7135:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(options_language,"ru", sizeof(options_language)); data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:8105:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(human_player_roster.player[1].name) <1) { data/foobillardplus-3.43~svn170+dfsg/src/billard3d.c:8109:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(human_player_roster.player[0].name) <1) { data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:258:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(player[act_player].name) > 0) { data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:377:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(player[act_player].name)>0) { data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:490: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(player[act_player].name)>0) { data/foobillardplus-3.43~svn170+dfsg/src/evaluate_move.c:705: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(player[act_player].name)>0) { data/foobillardplus-3.43~svn170+dfsg/src/getopt_long.c:51:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l=strlen(longopts[i].name); data/foobillardplus-3.43~svn170+dfsg/src/language.c:50:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(charlang, options_language, sizeof(charlang)); data/foobillardplus-3.43~svn170+dfsg/src/language.c:63: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). locale_code_pos += strlen("LC_MESSAGES") + 1; data/foobillardplus-3.43~svn170+dfsg/src/language.c:72:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(charlang, "en", sizeof(charlang)); data/foobillardplus-3.43~svn170+dfsg/src/language.c:77:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(charlang, "de", sizeof(charlang)); data/foobillardplus-3.43~svn170+dfsg/src/language.c:79:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(options_language,charlang, sizeof(charlang)); data/foobillardplus-3.43~svn170+dfsg/src/net_socket.c:166:6: [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(ip_adresses,";"); data/foobillardplus-3.43~svn170+dfsg/src/sound_stuff.c:100:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(s1) > 4) { data/foobillardplus-3.43~svn170+dfsg/src/sound_stuff.c:101: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). strcpy(s,&s[strlen(s)-4]); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:77:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer, st, ch-st); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:79: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). sprintf(buffer+(ch-st), "%s%s", repl, ch+strlen(orig)); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:224:10: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = fgetc(from); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:931:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(data_dir, data_directory, sizeof(data_dir)); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:932:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(exe_prog, data_directory, sizeof(exe_prog)); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:940:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(exe_prog, data_dir, sizeof(exe_prog)); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:951:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(slash_pos, "/data", sizeof(data_dir) - (slash_pos - data_dir)); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:959:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(data_dir, "data", sizeof(data_dir)); data/foobillardplus-3.43~svn170+dfsg/src/sys_stuff.c:972:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(data_dir, DATA_DIRECTORY, sizeof(data_dir)); data/foobillardplus-3.43~svn170+dfsg/src/textobj.c:157: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). slen = strlen(str); data/foobillardplus-3.43~svn170+dfsg/src/textobj.c:169: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). slen = strlen(str); ANALYSIS SUMMARY: Hits = 356 Lines analyzed = 134605 in approximately 10.69 seconds (12589 lines/second) Physical Source Lines of Code (SLOC) = 125583 Hits@level = [0] 229 [1] 35 [2] 160 [3] 18 [4] 142 [5] 1 Hits@level+ = [0+] 585 [1+] 356 [2+] 321 [3+] 161 [4+] 143 [5+] 1 Hits/KSLOC@level+ = [0+] 4.65827 [1+] 2.83478 [2+] 2.55608 [3+] 1.28202 [4+] 1.13869 [5+] 0.00796286 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.