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/vdr-plugin-fritzbox-1.5.3/menu.h
Examining data/vdr-plugin-fritzbox-1.5.3/libnet++/SoapClient.h
Examining data/vdr-plugin-fritzbox-1.5.3/libnet++/SoapClient.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libnet++/TcpClient.h
Examining data/vdr-plugin-fritzbox-1.5.3/libnet++/HttpClient.h
Examining data/vdr-plugin-fritzbox-1.5.3/libnet++/HttpClient.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libnet++/TcpClient.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libconv++/CharsetConverter.h
Examining data/vdr-plugin-fritzbox-1.5.3/libconv++/EntityConverter.h
Examining data/vdr-plugin-fritzbox-1.5.3/libconv++/EntityConverter.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libconv++/CharsetConverter.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/fritzeventhandler.h
Examining data/vdr-plugin-fritzbox-1.5.3/notifyosd.h
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/Config.h
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/Listener.h
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/LookupFonbook.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/CallList.h
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/XmlFonbook.h
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/XmlFonbook.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/LocalFonbook.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/Fonbook.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/Config.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/CallList.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/Tools.h
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/OertlichesFonbook.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/Fonbooks.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/FritzClient.h
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/LocalFonbook.h
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/Fonbook.h
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/FonbookManager.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/Tools.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/FritzClient.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/FonbookManager.h
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/Nummerzoeker.h
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/Nummerzoeker.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/OertlichesFonbook.h
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/Listener.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/TelLocalChFonbook.h
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/FritzFonbook.h
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/LookupFonbook.h
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/TelLocalChFonbook.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/FritzFonbook.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/libfritz++/Fonbooks.h
Examining data/vdr-plugin-fritzbox-1.5.3/notifyosd.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/fritzbox.h
Examining data/vdr-plugin-fritzbox-1.5.3/setup.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/fritzeventhandler.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/menu.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/setup.h
Examining data/vdr-plugin-fritzbox-1.5.3/liblog++/CustomLogStream.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/liblog++/Log.h
Examining data/vdr-plugin-fritzbox-1.5.3/liblog++/CustomLogStream.h
Examining data/vdr-plugin-fritzbox-1.5.3/liblog++/Log.cpp
Examining data/vdr-plugin-fritzbox-1.5.3/fritzbox.cpp

FINAL RESULTS:

data/vdr-plugin-fritzbox-1.5.3/libfritz++/LocalFonbook.cpp:88:6:  [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 (access(filePath, F_OK) == 0) {
data/vdr-plugin-fritzbox-1.5.3/libfritz++/LocalFonbook.cpp:109:7:  [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 (access(filePath, F_OK) == 0) {
data/vdr-plugin-fritzbox-1.5.3/fritzbox.cpp:91:17:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((c = getopt_long(argc, argv, "pc:", long_options, NULL)) != -1) {
data/vdr-plugin-fritzbox-1.5.3/libconv++/CharsetConverter.cpp:89: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 *langPtr = getenv("LANG");
data/vdr-plugin-fritzbox-1.5.3/libconv++/EntityConverter.cpp:150: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 out_buffer[8];
data/vdr-plugin-fritzbox-1.5.3/libfritz++/CallList.cpp:150: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).
		type = atoi(&msg[type]);
data/vdr-plugin-fritzbox-1.5.3/libfritz++/CallList.cpp:167:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		tmCallTime.tm_mday = atoi(ce.date.substr(0, 2).c_str());
data/vdr-plugin-fritzbox-1.5.3/libfritz++/CallList.cpp:168:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		tmCallTime.tm_mon  = atoi(ce.date.substr(3, 2).c_str()) - 1;
data/vdr-plugin-fritzbox-1.5.3/libfritz++/CallList.cpp:169:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		tmCallTime.tm_year = atoi(ce.date.substr(6, 2).c_str()) + 100;
data/vdr-plugin-fritzbox-1.5.3/libfritz++/CallList.cpp:170:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		tmCallTime.tm_hour = atoi(ce.time.substr(0, 2).c_str());
data/vdr-plugin-fritzbox-1.5.3/libfritz++/CallList.cpp:171:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		tmCallTime.tm_min  = atoi(ce.time.substr(3, 2).c_str());
data/vdr-plugin-fritzbox-1.5.3/libfritz++/Fonbook.cpp:144: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 qd1 = atoi(fe1.getQuickdial().c_str());
data/vdr-plugin-fritzbox-1.5.3/libfritz++/Fonbook.cpp:145: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 qd2 = atoi(fe2.getQuickdial().c_str());
data/vdr-plugin-fritzbox-1.5.3/libfritz++/Fonbook.cpp:150: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 vt1 = atoi(fe1.getVanity().c_str());
data/vdr-plugin-fritzbox-1.5.3/libfritz++/Fonbook.cpp:151: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 vt2 = atoi(fe2.getVanity().c_str());
data/vdr-plugin-fritzbox-1.5.3/libfritz++/FritzClient.cpp:78: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 challengePwdConv[challengePwd.length()*2];
data/vdr-plugin-fritzbox-1.5.3/libfritz++/FritzClient.cpp:79: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(challengePwdConv, conv.convert(challengePwd).c_str(), challengePwd.length()*2);
data/vdr-plugin-fritzbox-1.5.3/libfritz++/FritzClient.cpp:85:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char hash[16];
data/vdr-plugin-fritzbox-1.5.3/libfritz++/Listener.cpp:85:45:  [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).
				gConfig->getSipNames().size() > (size_t)atoi(&medium[3]))
data/vdr-plugin-fritzbox-1.5.3/libfritz++/Listener.cpp:86:40:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			mediumName = gConfig->getSipNames()[atoi(&medium[3])];
data/vdr-plugin-fritzbox-1.5.3/libfritz++/Listener.cpp:148: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).
				int connId        = atoi(Tools::Tokenize(line, ';', 2).c_str());
data/vdr-plugin-fritzbox-1.5.3/libfritz++/LocalFonbook.cpp:104: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 fileNames[3][20] = {"localphonebook.csv", "localfonbook.csv", "localfonbuch.csv"};
data/vdr-plugin-fritzbox-1.5.3/libfritz++/LocalFonbook.cpp:146: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).
	FILE *f = fopen(filePath.c_str(), "r");
data/vdr-plugin-fritzbox-1.5.3/libfritz++/LocalFonbook.cpp:157:56:  [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).
				FonbookEntry::eType type   = (FonbookEntry::eType) atoi(type_buffer);
data/vdr-plugin-fritzbox-1.5.3/libfritz++/XmlFonbook.cpp:108:51:  [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).
				fe.addNumber(number, type, quickdial, vanity, atoi(prio.c_str()));
data/vdr-plugin-fritzbox-1.5.3/notifyosd.h:36:14:  [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).
	static bool open;
data/vdr-plugin-fritzbox-1.5.3/notifyosd.h:45:32:  [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).
	static bool isOpen() { return open; }
data/vdr-plugin-fritzbox-1.5.3/setup.cpp:502:77:  [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 (!strcasecmp(name, "ReactOnDirection"))     reactOnDirection     = atoi(value);
data/vdr-plugin-fritzbox-1.5.3/setup.cpp:503:66:  [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 (!strcasecmp(name, "MuteOnCall"))   		muteOnCall   		 = atoi(value);
data/vdr-plugin-fritzbox-1.5.3/setup.cpp:504:77:  [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 (!strcasecmp(name, "MuteAfterConnect"))     muteAfterConnect   	 = atoi(value);
data/vdr-plugin-fritzbox-1.5.3/setup.cpp:505:76:  [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 (!strcasecmp(name, "MuteVolumeLevel"))      muteVolumeLevel   	 = atoi(value);
data/vdr-plugin-fritzbox-1.5.3/setup.cpp:506:68:  [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 (!strcasecmp(name, "PauseOnCall"))   		pauseOnCall   		 = atoi(value);
data/vdr-plugin-fritzbox-1.5.3/setup.cpp:507:77:  [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 (!strcasecmp(name, "PauseLive"))            pauseLive            = atoi(value);
data/vdr-plugin-fritzbox-1.5.3/setup.cpp:508:77:  [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 (!strcasecmp(name, "ResumeAfterCall"))      resumeAfterCall      = atoi(value);
data/vdr-plugin-fritzbox-1.5.3/setup.cpp:509:66:  [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 (!strcasecmp(name, "ShowNumber"))   		showNumber   		 = atoi(value);
data/vdr-plugin-fritzbox-1.5.3/setup.cpp:510:77:  [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 (!strcasecmp(name, "UseNotifyOsd"))         useNotifyOsd         = atoi(value);
data/vdr-plugin-fritzbox-1.5.3/setup.cpp:511:77:  [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 (!strcasecmp(name, "ShowNumberInCallList")) showNumberInCallList = atoi(value);
data/vdr-plugin-fritzbox-1.5.3/setup.cpp:512:77:  [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 (!strcasecmp(name, "LastKnownMissedCall"))  lastKnownMissedCall  = atoi(value);
data/vdr-plugin-fritzbox-1.5.3/setup.cpp:513:77:  [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 (!strcasecmp(name, "ShowDaySeparator"))     showDaySeparator     = atoi(value);
data/vdr-plugin-fritzbox-1.5.3/setup.cpp:514:66:  [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 (!strcasecmp(name, "HideMainMenu")) 		hideMainMenu 		 = atoi(value);
data/vdr-plugin-fritzbox-1.5.3/setup.cpp:515:77:  [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 (!strcasecmp(name, "DefaultMenu"))          defaultMenu          = atoi(value);
data/vdr-plugin-fritzbox-1.5.3/setup.h:42: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 *directions[3];
data/vdr-plugin-fritzbox-1.5.3/setup.h: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 *menus[4];
data/vdr-plugin-fritzbox-1.5.3/fritzbox.cpp:223: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(Value) > 0) {
data/vdr-plugin-fritzbox-1.5.3/liblog++/CustomLogStream.cpp:43:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buffer, pbase(), len);

ANALYSIS SUMMARY:

Hits = 45
Lines analyzed = 7320 in approximately 0.21 seconds (35552 lines/second)
Physical Source Lines of Code (SLOC) = 4829
Hits@level = [0]   1 [1]   2 [2]  39 [3]   2 [4]   2 [5]   0
Hits@level+ = [0+]  46 [1+]  45 [2+]  43 [3+]   4 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 9.52578 [1+] 9.3187 [2+] 8.90454 [3+] 0.828329 [4+] 0.414164 [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.