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/gmlive-0.22.3/src/mmschannel.h Examining data/gmlive-0.22.3/src/sopcastLivePlayer.h Examining data/gmlive-0.22.3/src/ec_throw.h Examining data/gmlive-0.22.3/src/ConfWindow.h Examining data/gmlive-0.22.3/src/bookmarkchannel.h Examining data/gmlive-0.22.3/src/ConfWindow.cpp Examining data/gmlive-0.22.3/src/MainWindow.h Examining data/gmlive-0.22.3/src/scope_gruard.h Examining data/gmlive-0.22.3/src/channel.h Examining data/gmlive-0.22.3/src/mmschannel.cpp Examining data/gmlive-0.22.3/src/recentchannel.h Examining data/gmlive-0.22.3/src/main.cpp Examining data/gmlive-0.22.3/src/ChannelsTooltips.cpp Examining data/gmlive-0.22.3/src/gmplayer.h Examining data/gmlive-0.22.3/src/variablesmap.cpp Examining data/gmlive-0.22.3/src/MainWindow.cpp Examining data/gmlive-0.22.3/src/ppsPlayer.h Examining data/gmlive-0.22.3/src/sopcastchannel.h Examining data/gmlive-0.22.3/src/gmlive.h Examining data/gmlive-0.22.3/src/recentchannel.cpp Examining data/gmlive-0.22.3/src/pplivechannel.h Examining data/gmlive-0.22.3/src/variablesmap.h Examining data/gmlive-0.22.3/src/pplivePlayer.h Examining data/gmlive-0.22.3/src/ppsPlayer.cpp Examining data/gmlive-0.22.3/src/ChannelsTooltips.h Examining data/gmlive-0.22.3/src/pplivechannel.cpp Examining data/gmlive-0.22.3/src/pplivePlayer.cpp Examining data/gmlive-0.22.3/src/sopcastLivePlayer.cpp Examining data/gmlive-0.22.3/src/mmsLivePlayer.cpp Examining data/gmlive-0.22.3/src/CodeConverter.h Examining data/gmlive-0.22.3/src/mmsLivePlayer.h Examining data/gmlive-0.22.3/src/livePlayer.h Examining data/gmlive-0.22.3/src/ec_throw.cpp Examining data/gmlive-0.22.3/src/sopcastchannel.cpp Examining data/gmlive-0.22.3/src/ppschannel.h Examining data/gmlive-0.22.3/src/bookmarkchannel.cpp Examining data/gmlive-0.22.3/src/gmplayer.cpp Examining data/gmlive-0.22.3/src/TrayIcon.cpp Examining data/gmlive-0.22.3/src/ppschannel.cpp Examining data/gmlive-0.22.3/src/TrayIcon.h Examining data/gmlive-0.22.3/src/channel.cpp FINAL RESULTS: data/gmlive-0.22.3/src/MainWindow.cpp:1063:4: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buf, name); data/gmlive-0.22.3/src/gmlive.h:37:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, "%s|%s|%d| " fmt, \ data/gmlive-0.22.3/src/gmplayer.cpp:190:3: [4] (shell) execvp: 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. execvp(argv[0], argv); data/gmlive-0.22.3/src/gmplayer.cpp:328:11: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (0 == access(outfilename.c_str(), F_OK)) { data/gmlive-0.22.3/src/gmplayer.cpp:380:3: [4] (shell) execvp: 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. execvp(argv[0], (char* const*)argv); data/gmlive-0.22.3/src/gmplayer.cpp:450:12: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (0 == access(outfilename.c_str(), F_OK)) { data/gmlive-0.22.3/src/mmschannel.cpp:146:3: [4] (shell) execvp: 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. execvp("wget", (char* const *)argv); data/gmlive-0.22.3/src/pplivePlayer.cpp:87:3: [4] (shell) execvp: 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. execvp(argv[0], (char* const *)argv); data/gmlive-0.22.3/src/pplivechannel.cpp:122:3: [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(command); data/gmlive-0.22.3/src/pplivechannel.cpp:185:3: [4] (shell) execvp: 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. execvp("wget", (char* const *)argv); data/gmlive-0.22.3/src/pplivechannel.cpp:234:4: [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(command); data/gmlive-0.22.3/src/ppsPlayer.cpp:96:3: [4] (shell) execvp: 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. execvp(argv[0], (char* const *)argv); data/gmlive-0.22.3/src/ppschannel.cpp:186:3: [4] (shell) execvp: 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. execvp("wget", (char* const *)argv); data/gmlive-0.22.3/src/ppschannel.cpp:285:3: [4] (shell) execvp: 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. execvp("wget", (char* const *)argv); data/gmlive-0.22.3/src/ppschannel.cpp:413:3: [4] (shell) execvp: 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. execvp("wget", (char* const *)argv); data/gmlive-0.22.3/src/sopcastLivePlayer.cpp:97:3: [4] (shell) execvp: 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. execvp(argv[0], (char* const *)argv); data/gmlive-0.22.3/src/sopcastchannel.cpp:123:4: [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(command); data/gmlive-0.22.3/src/sopcastchannel.cpp:156:3: [4] (shell) execvp: 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. execvp("wget", (char* const *)argv); data/gmlive-0.22.3/src/MainWindow.cpp:1050:14: [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. char *env = getenv("PATH"); data/gmlive-0.22.3/src/gmplayer.cpp:117:18: [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. char* homedir = getenv("HOME"); data/gmlive-0.22.3/src/CodeConverter.h:53: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 outbuf[outlen]; data/gmlive-0.22.3/src/MainWindow.cpp:188:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). refresh_sopcast_channels = atoi(GMConf["check_refresh_sopcast_channels"].c_str()); data/gmlive-0.22.3/src/MainWindow.cpp:321:6: [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(GMConf["enable_tray"].c_str())) data/gmlive-0.22.3/src/MainWindow.cpp:325:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). window_width = atoi(wnd_width.c_str()); data/gmlive-0.22.3/src/MainWindow.cpp:329:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). window_height = atoi(wnd_height.c_str()); data/gmlive-0.22.3/src/MainWindow.cpp:332:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). channels_hide = atoi(GMConf["channels_hide"].c_str()); data/gmlive-0.22.3/src/MainWindow.cpp:333:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). toolbar_hide = atoi(GMConf["toolbar_hide"].c_str()); data/gmlive-0.22.3/src/MainWindow.cpp:334:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gmp_embed = atoi(GMConf["mplayer_embed"].c_str()); data/gmlive-0.22.3/src/MainWindow.cpp:339:19: [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). set_other_player(atoi(GMConf["player_type"].c_str())); data/gmlive-0.22.3/src/MainWindow.cpp:704:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (gmp_embed || !atoi(GMConf["close_to_systray"].c_str())) { data/gmlive-0.22.3/src/MainWindow.cpp:716:6: [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(GMConf["close_to_systray"].c_str())) data/gmlive-0.22.3/src/MainWindow.cpp:718:12: [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). else if (!atoi(GMConf["enable_tray"].c_str())) data/gmlive-0.22.3/src/MainWindow.cpp:840:19: [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). set_other_player(atoi(GMConf["player_type"].c_str())); data/gmlive-0.22.3/src/MainWindow.cpp:865:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/gmlive-0.22.3/src/MainWindow.cpp:904:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/gmlive-0.22.3/src/MainWindow.cpp:905:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, _("Caching... %d%%"), percentage); data/gmlive-0.22.3/src/MainWindow.cpp:930:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/gmlive-0.22.3/src/MainWindow.cpp:950:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). menu->set_active(atoi(GMConf["mplayer_embed"].c_str())); data/gmlive-0.22.3/src/MainWindow.cpp:953:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). set_gmp_embed(atoi(GMConf["mplayer_embed"].c_str())); data/gmlive-0.22.3/src/MainWindow.cpp:967:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/gmlive-0.22.3/src/MainWindow.cpp:968:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", gmp_embed); data/gmlive-0.22.3/src/MainWindow.cpp:993: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). set_channels_hide(atoi(GMConf["channels_hide"].c_str())); data/gmlive-0.22.3/src/MainWindow.cpp:1039:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/gmlive-0.22.3/src/MainWindow.cpp:1040:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", window_width); data/gmlive-0.22.3/src/MainWindow.cpp:1043:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", window_height); data/gmlive-0.22.3/src/MainWindow.cpp:1051:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/MainWindow.cpp:1065:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(buf,"r"); data/gmlive-0.22.3/src/MainWindow.cpp:1125:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/MainWindow.cpp:1130: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 homepath[512]; data/gmlive-0.22.3/src/MainWindow.cpp:1214:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/MainWindow.cpp:1227:6: [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(GMConf["enable_tray"].c_str())) data/gmlive-0.22.3/src/MainWindow.cpp:1411:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/gmlive-0.22.3/src/MainWindow.cpp:1488:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char result[strlen (escaped_string) + 1]; data/gmlive-0.22.3/src/MainWindow.cpp:1517:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char new_buf[len]; data/gmlive-0.22.3/src/MainWindow.cpp:1545:7: [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). w = atoi(pw); data/gmlive-0.22.3/src/MainWindow.cpp:1550:7: [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). h = atoi(ph); data/gmlive-0.22.3/src/bookmarkchannel.cpp:53:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/bookmarkchannel.cpp:146:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/gmplayer.cpp:116:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/gmplayer.cpp:299: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 cache_buf[32]; data/gmlive-0.22.3/src/gmplayer.cpp:300:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cache_buf, "%d", icache); data/gmlive-0.22.3/src/gmplayer.cpp:308: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 wid_buf[32]; data/gmlive-0.22.3/src/gmplayer.cpp:361:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cache_buf[32]; data/gmlive-0.22.3/src/gmplayer.cpp:362:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cache_buf, "%d", icache); data/gmlive-0.22.3/src/gmplayer.cpp:451: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 buf[32]; data/gmlive-0.22.3/src/gmplayer.cpp:452:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "-%d", outfile_num++); data/gmlive-0.22.3/src/gmplayer.cpp:477:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). outfile = open(outfilename.c_str(), O_RDONLY); data/gmlive-0.22.3/src/gmplayer.cpp:484:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/main.cpp:43:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/gmlive-0.22.3/src/mmsLivePlayer.cpp:47:15: [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). int icache = atoi(cache.c_str()); data/gmlive-0.22.3/src/mmschannel.cpp:44:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/mmschannel.cpp:50:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file.open(buf); data/gmlive-0.22.3/src/mmschannel.cpp:105:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/mmschannel.cpp:106:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf2[512]; data/gmlive-0.22.3/src/mmschannel.cpp:133: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[512]; data/gmlive-0.22.3/src/pplivePlayer.cpp:98:15: [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). int idelay = atoi(delay.c_str()); data/gmlive-0.22.3/src/pplivePlayer.cpp:106:15: [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). int icache = atoi(cache.c_str()); data/gmlive-0.22.3/src/pplivechannel.cpp:91:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int users = atoi(peer_count.c_str()); data/gmlive-0.22.3/src/pplivechannel.cpp:96:13: [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). int freq = atoi(bitrate.c_str()); data/gmlive-0.22.3/src/pplivechannel.cpp:119:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char command[1024]; data/gmlive-0.22.3/src/pplivechannel.cpp:144:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/pplivechannel.cpp:172: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[512]; data/gmlive-0.22.3/src/pplivechannel.cpp:205:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(url_buf, url.c_str(), MIN(url.size(), 1024)); data/gmlive-0.22.3/src/pplivechannel.cpp:219:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/pplivechannel.cpp:220:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf2[512]; data/gmlive-0.22.3/src/pplivechannel.cpp:232: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 command[512]; data/gmlive-0.22.3/src/pplivechannel.h:50: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 url_buf[1024]; data/gmlive-0.22.3/src/ppsPlayer.cpp:152:10: [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). int i = atoi(p ? p : "0"); data/gmlive-0.22.3/src/ppschannel.cpp:45:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/ppschannel.cpp:59:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/ppschannel.cpp:166: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[512]; data/gmlive-0.22.3/src/ppschannel.cpp:170: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 buf2[512]; data/gmlive-0.22.3/src/ppschannel.cpp:197:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/ppschannel.cpp:219: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). (*iter)[columns.pps_id] = atoi((const char*)p); data/gmlive-0.22.3/src/ppschannel.cpp:229: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). (*iter)[columns.pps_num] = atoi((const char*)p); data/gmlive-0.22.3/src/ppschannel.cpp:269: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[512]; data/gmlive-0.22.3/src/ppschannel.cpp:273: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 buf2[512]; data/gmlive-0.22.3/src/ppschannel.cpp:310: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). (*iter)[columns.pps_id] = atoi((const char*)p); data/gmlive-0.22.3/src/ppschannel.cpp:324:32: [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). (*iter)[columns.pps_type] = atoi((const char*)p); data/gmlive-0.22.3/src/ppschannel.cpp:331:31: [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). (*iter)[columns.pps_num] = atoi((const char*)p); data/gmlive-0.22.3/src/ppschannel.cpp:373:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/ppschannel.cpp:374:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf2[512]; data/gmlive-0.22.3/src/ppschannel.cpp:400: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[512]; data/gmlive-0.22.3/src/recentchannel.cpp:56:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/recentchannel.cpp:63:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file.open(buf); data/gmlive-0.22.3/src/recentchannel.cpp:137:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/sopcastLivePlayer.cpp:28:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *) &serv_addr.sin_addr.s_addr, data/gmlive-0.22.3/src/sopcastLivePlayer.cpp:115:16: [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). int icache = atoi(cache.c_str()); data/gmlive-0.22.3/src/sopcastLivePlayer.cpp:148:10: [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). int i = atoi(p ? p : "0"); data/gmlive-0.22.3/src/sopcastLivePlayer.cpp:153:16: [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). int icache = atoi(cache.c_str()); data/gmlive-0.22.3/src/sopcastchannel.cpp:85:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int users = atoi(str.c_str()); data/gmlive-0.22.3/src/sopcastchannel.cpp:89:13: [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). int freq = atoi(str.c_str()); data/gmlive-0.22.3/src/sopcastchannel.cpp:108:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/sopcastchannel.cpp:110:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf2[512]; data/gmlive-0.22.3/src/sopcastchannel.cpp:121: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 command[512]; data/gmlive-0.22.3/src/sopcastchannel.cpp:143: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[512]; data/gmlive-0.22.3/src/sopcastchannel.cpp:199:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/gmlive-0.22.3/src/MainWindow.cpp:1059:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ( buf, start, end - start+1); data/gmlive-0.22.3/src/MainWindow.cpp:1060: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 (buf[strlen(buf)-1] != '/') data/gmlive-0.22.3/src/MainWindow.cpp:1061: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). buf[strlen(buf)] = '/'; data/gmlive-0.22.3/src/MainWindow.cpp:1412:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t len = read(fd_cli, &buf[0], 1023); data/gmlive-0.22.3/src/MainWindow.cpp:1488:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char result[strlen (escaped_string) + 1]; data/gmlive-0.22.3/src/MainWindow.cpp:1508:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert (out - result <= strlen (escaped_string)); data/gmlive-0.22.3/src/gmplayer.cpp:210:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). EC_THROW(-1 == write(player_child_tem, c, strlen (c))); data/gmlive-0.22.3/src/gmplayer.h:60:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { return read(player_child_tem, buf, count); } ANALYSIS SUMMARY: Hits = 125 Lines analyzed = 7014 in approximately 0.22 seconds (32364 lines/second) Physical Source Lines of Code (SLOC) = 5088 Hits@level = [0] 67 [1] 8 [2] 97 [3] 2 [4] 18 [5] 0 Hits@level+ = [0+] 192 [1+] 125 [2+] 117 [3+] 20 [4+] 18 [5+] 0 Hits/KSLOC@level+ = [0+] 37.7358 [1+] 24.5676 [2+] 22.9953 [3+] 3.93082 [4+] 3.53774 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.