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/knxd-0.14.35/src/backend/dummy.cpp Examining data/knxd-0.14.35/src/backend/dummy.h Examining data/knxd-0.14.35/src/backend/eibnetrouter.cpp Examining data/knxd-0.14.35/src/backend/eibnetrouter.h Examining data/knxd-0.14.35/src/backend/eibnettunnel.cpp Examining data/knxd-0.14.35/src/backend/eibnettunnel.h Examining data/knxd-0.14.35/src/backend/fpace.cpp Examining data/knxd-0.14.35/src/backend/fpace.h Examining data/knxd-0.14.35/src/backend/fqueue.cpp Examining data/knxd-0.14.35/src/backend/fqueue.h Examining data/knxd-0.14.35/src/backend/ft12.cpp Examining data/knxd-0.14.35/src/backend/ft12.h Examining data/knxd-0.14.35/src/backend/log.cpp Examining data/knxd-0.14.35/src/backend/log.h Examining data/knxd-0.14.35/src/backend/nat.cpp Examining data/knxd-0.14.35/src/backend/nat.h Examining data/knxd-0.14.35/src/backend/ncn5120.cpp Examining data/knxd-0.14.35/src/backend/ncn5120.h Examining data/knxd-0.14.35/src/backend/tpuart.cpp Examining data/knxd-0.14.35/src/backend/tpuart.h Examining data/knxd-0.14.35/src/client/c/close.c Examining data/knxd-0.14.35/src/client/c/closesync.c Examining data/knxd-0.14.35/src/client/c/complete.c Examining data/knxd-0.14.35/src/client/c/eibclient-int.h Examining data/knxd-0.14.35/src/client/c/io.c Examining data/knxd-0.14.35/src/client/c/openlocal.c Examining data/knxd-0.14.35/src/client/c/openremote.c Examining data/knxd-0.14.35/src/client/c/openurl.c Examining data/knxd-0.14.35/src/client/c/pollcomplete.c Examining data/knxd-0.14.35/src/client/c/pollfd.c Examining data/knxd-0.14.35/src/client/cs/dummy.cpp Examining data/knxd-0.14.35/src/client/go/gen.c Examining data/knxd-0.14.35/src/client/java/dummy.cpp Examining data/knxd-0.14.35/src/client/lua/gen.c Examining data/knxd-0.14.35/src/client/pascal/gen.c Examining data/knxd-0.14.35/src/client/pascal/genh.c Examining data/knxd-0.14.35/src/client/perl/dummy.cpp Examining data/knxd-0.14.35/src/client/php/dummy.cpp Examining data/knxd-0.14.35/src/client/python/gen.c Examining data/knxd-0.14.35/src/client/ruby/gen.c Examining data/knxd-0.14.35/src/common/callbacks.h Examining data/knxd-0.14.35/src/common/eibloadresult.h Examining data/knxd-0.14.35/src/common/image.cpp Examining data/knxd-0.14.35/src/common/image.h Examining data/knxd-0.14.35/src/common/inifile.cpp Examining data/knxd-0.14.35/src/common/inifile.h Examining data/knxd-0.14.35/src/common/inih.c Examining data/knxd-0.14.35/src/common/inih.h Examining data/knxd-0.14.35/src/common/iobuf.cpp Examining data/knxd-0.14.35/src/common/iobuf.h Examining data/knxd-0.14.35/src/common/loadctl.h Examining data/knxd-0.14.35/src/common/loadimage.cpp Examining data/knxd-0.14.35/src/common/loadimage.h Examining data/knxd-0.14.35/src/common/queue.h Examining data/knxd-0.14.35/src/common/types.h Examining data/knxd-0.14.35/src/examples/busmonitor1.c Examining data/knxd-0.14.35/src/examples/busmonitor2.c Examining data/knxd-0.14.35/src/examples/busmonitor3.c Examining data/knxd-0.14.35/src/examples/groupcacheclear.c Examining data/knxd-0.14.35/src/examples/groupcachedisable.c Examining data/knxd-0.14.35/src/examples/groupcacheenable.c Examining data/knxd-0.14.35/src/examples/groupcachelastupdates.c Examining data/knxd-0.14.35/src/examples/groupcacheread.c Examining data/knxd-0.14.35/src/examples/groupcachereadsync.c Examining data/knxd-0.14.35/src/examples/groupcacheremove.c Examining data/knxd-0.14.35/src/examples/grouplisten.c Examining data/knxd-0.14.35/src/examples/groupread.c Examining data/knxd-0.14.35/src/examples/groupreadresponse.c Examining data/knxd-0.14.35/src/examples/groupresponse.c Examining data/knxd-0.14.35/src/examples/groupsocketlisten.c Examining data/knxd-0.14.35/src/examples/groupsocketread.c Examining data/knxd-0.14.35/src/examples/groupsocketswrite.c Examining data/knxd-0.14.35/src/examples/groupsocketwrite.c Examining data/knxd-0.14.35/src/examples/groupsresponse.c Examining data/knxd-0.14.35/src/examples/groupswrite.c Examining data/knxd-0.14.35/src/examples/groupwrite.c Examining data/knxd-0.14.35/src/examples/madcread.c Examining data/knxd-0.14.35/src/examples/maskver.c Examining data/knxd-0.14.35/src/examples/mmaskver.c Examining data/knxd-0.14.35/src/examples/mpeitype.c Examining data/knxd-0.14.35/src/examples/mprogmodeoff.c Examining data/knxd-0.14.35/src/examples/mprogmodeon.c Examining data/knxd-0.14.35/src/examples/mprogmodestatus.c Examining data/knxd-0.14.35/src/examples/mprogmodetoggle.c Examining data/knxd-0.14.35/src/examples/mpropdesc.c Examining data/knxd-0.14.35/src/examples/mpropread.c Examining data/knxd-0.14.35/src/examples/mpropscan.c Examining data/knxd-0.14.35/src/examples/mpropscanpoll.c Examining data/knxd-0.14.35/src/examples/mpropwrite.c Examining data/knxd-0.14.35/src/examples/mread.c Examining data/knxd-0.14.35/src/examples/mrestart.c Examining data/knxd-0.14.35/src/examples/msetkey.c Examining data/knxd-0.14.35/src/examples/mwrite.c Examining data/knxd-0.14.35/src/examples/mwriteplain.c Examining data/knxd-0.14.35/src/examples/progmodeoff.c Examining data/knxd-0.14.35/src/examples/progmodeon.c Examining data/knxd-0.14.35/src/examples/progmodestatus.c Examining data/knxd-0.14.35/src/examples/progmodetoggle.c Examining data/knxd-0.14.35/src/examples/readindividual.c Examining data/knxd-0.14.35/src/examples/vbusmonitor1.c Examining data/knxd-0.14.35/src/examples/vbusmonitor1poll.c Examining data/knxd-0.14.35/src/examples/vbusmonitor1time.c Examining data/knxd-0.14.35/src/examples/vbusmonitor2.c Examining data/knxd-0.14.35/src/examples/vbusmonitor3.c Examining data/knxd-0.14.35/src/examples/writeaddress.c Examining data/knxd-0.14.35/src/examples/xpropread.c Examining data/knxd-0.14.35/src/examples/xpropwrite.c Examining data/knxd-0.14.35/src/include/eibclient.h Examining data/knxd-0.14.35/src/include/eibtypes.h Examining data/knxd-0.14.35/src/libserver/apdu.cpp Examining data/knxd-0.14.35/src/libserver/apdu.h Examining data/knxd-0.14.35/src/libserver/busmonitor.cpp Examining data/knxd-0.14.35/src/libserver/busmonitor.h Examining data/knxd-0.14.35/src/libserver/cemi.cpp Examining data/knxd-0.14.35/src/libserver/cemi.h Examining data/knxd-0.14.35/src/libserver/client.cpp Examining data/knxd-0.14.35/src/libserver/client.h Examining data/knxd-0.14.35/src/libserver/cm_ip.cpp Examining data/knxd-0.14.35/src/libserver/cm_ip.h Examining data/knxd-0.14.35/src/libserver/cm_tp1.cpp Examining data/knxd-0.14.35/src/libserver/cm_tp1.h Examining data/knxd-0.14.35/src/libserver/common.cpp Examining data/knxd-0.14.35/src/libserver/common.h Examining data/knxd-0.14.35/src/libserver/connection.cpp Examining data/knxd-0.14.35/src/libserver/connection.h Examining data/knxd-0.14.35/src/libserver/driver_remap.h Examining data/knxd-0.14.35/src/libserver/eibnetip.cpp Examining data/knxd-0.14.35/src/libserver/eibnetip.h Examining data/knxd-0.14.35/src/libserver/eibnetserver.cpp Examining data/knxd-0.14.35/src/libserver/eibnetserver.h Examining data/knxd-0.14.35/src/libserver/eibusb.cpp Examining data/knxd-0.14.35/src/libserver/eibusb.h Examining data/knxd-0.14.35/src/libserver/emi.cpp Examining data/knxd-0.14.35/src/libserver/emi.h Examining data/knxd-0.14.35/src/libserver/emi1.cpp Examining data/knxd-0.14.35/src/libserver/emi1.h Examining data/knxd-0.14.35/src/libserver/emi2.cpp Examining data/knxd-0.14.35/src/libserver/emi2.h Examining data/knxd-0.14.35/src/libserver/emi_common.cpp Examining data/knxd-0.14.35/src/libserver/emi_common.h Examining data/knxd-0.14.35/src/libserver/groupcache.cpp Examining data/knxd-0.14.35/src/libserver/groupcache.h Examining data/knxd-0.14.35/src/libserver/groupcacheclient.cpp Examining data/knxd-0.14.35/src/libserver/groupcacheclient.h Examining data/knxd-0.14.35/src/libserver/inetserver.cpp Examining data/knxd-0.14.35/src/libserver/inetserver.h Examining data/knxd-0.14.35/src/libserver/ipsupport.cpp Examining data/knxd-0.14.35/src/libserver/ipsupport.h Examining data/knxd-0.14.35/src/libserver/layer3.cpp Examining data/knxd-0.14.35/src/libserver/layer3.h Examining data/knxd-0.14.35/src/libserver/layer4.cpp Examining data/knxd-0.14.35/src/libserver/layer4.h Examining data/knxd-0.14.35/src/libserver/layer7.cpp Examining data/knxd-0.14.35/src/libserver/layer7.h Examining data/knxd-0.14.35/src/libserver/link.cpp Examining data/knxd-0.14.35/src/libserver/link.h Examining data/knxd-0.14.35/src/libserver/llserial.cpp Examining data/knxd-0.14.35/src/libserver/llserial.h Examining data/knxd-0.14.35/src/libserver/lltcp.cpp Examining data/knxd-0.14.35/src/libserver/lltcp.h Examining data/knxd-0.14.35/src/libserver/localserver.cpp Examining data/knxd-0.14.35/src/libserver/localserver.h Examining data/knxd-0.14.35/src/libserver/lowlatency.cpp Examining data/knxd-0.14.35/src/libserver/lowlatency.h Examining data/knxd-0.14.35/src/libserver/lowlevel.cpp Examining data/knxd-0.14.35/src/libserver/lowlevel.h Examining data/knxd-0.14.35/src/libserver/lpdu.cpp Examining data/knxd-0.14.35/src/libserver/lpdu.h Examining data/knxd-0.14.35/src/libserver/management.cpp Examining data/knxd-0.14.35/src/libserver/management.h Examining data/knxd-0.14.35/src/libserver/managementclient.cpp Examining data/knxd-0.14.35/src/libserver/managementclient.h Examining data/knxd-0.14.35/src/libserver/npdu.cpp Examining data/knxd-0.14.35/src/libserver/npdu.h Examining data/knxd-0.14.35/src/libserver/retry.cpp Examining data/knxd-0.14.35/src/libserver/retry.h Examining data/knxd-0.14.35/src/libserver/router.cpp Examining data/knxd-0.14.35/src/libserver/router.h Examining data/knxd-0.14.35/src/libserver/server.cpp Examining data/knxd-0.14.35/src/libserver/server.h Examining data/knxd-0.14.35/src/libserver/systemdserver.cpp Examining data/knxd-0.14.35/src/libserver/systemdserver.h Examining data/knxd-0.14.35/src/libserver/tpdu.cpp Examining data/knxd-0.14.35/src/libserver/tpdu.h Examining data/knxd-0.14.35/src/libserver/trace.cpp Examining data/knxd-0.14.35/src/libserver/trace.h Examining data/knxd-0.14.35/src/libserver/usblowlevel.cpp Examining data/knxd-0.14.35/src/libserver/usblowlevel.h Examining data/knxd-0.14.35/src/server/knxd.cpp Examining data/knxd-0.14.35/src/server/knxd_args.cpp Examining data/knxd-0.14.35/src/tools/bcu/addrtab.cpp Examining data/knxd-0.14.35/src/tools/bcu/addrtab.h Examining data/knxd-0.14.35/src/tools/bcu/bcuaddrtab.cpp Examining data/knxd-0.14.35/src/tools/bcu/bcuread.cpp Examining data/knxd-0.14.35/src/tools/bcu/l-FT12.h Examining data/knxd-0.14.35/src/tools/bcu/l-USB.h Examining data/knxd-0.14.35/src/tools/bcu/lowlevelconf.h Examining data/knxd-0.14.35/src/tools/bcu/lowlevelcreate.h Examining data/knxd-0.14.35/src/tools/common.c Examining data/knxd-0.14.35/src/tools/common.h Examining data/knxd-0.14.35/src/tools/eibnet/eibnetdescribe.cpp Examining data/knxd-0.14.35/src/tools/eibnet/eibnetsearch.cpp Examining data/knxd-0.14.35/src/tools/eibread-cgi.c Examining data/knxd-0.14.35/src/tools/eibwrite-cgi.c Examining data/knxd-0.14.35/src/tools/knxtool.c Examining data/knxd-0.14.35/src/usb/dummy.cpp Examining data/knxd-0.14.35/src/usb/findknxusb.cpp Examining data/knxd-0.14.35/src/usb/usb.cpp Examining data/knxd-0.14.35/src/usb/usb.h Examining data/knxd-0.14.35/tools/test_inih.cpp FINAL RESULTS: data/knxd-0.14.35/src/common/image.cpp:261:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "StringParameter: addr=%04x id=%s length=%d\n", addr, name.c_str(), data/knxd-0.14.35/src/common/image.cpp:306:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "IntParameter: addr=%04x id=%s type=%s %d bytes\n", addr, data/knxd-0.14.35/src/common/image.cpp:349:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "FloatParameter: addr=%04x id=%s\n", addr, name.c_str()); data/knxd-0.14.35/src/common/image.cpp:423:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "ListParameter: addr=%04x id=%s elements=", addr, name.c_str()); data/knxd-0.14.35/src/common/image.cpp:427:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "%s,", elements[i].c_str()); data/knxd-0.14.35/src/common/image.cpp:456:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "GROUP_OBJECT %d: id=%s\n", no, name.c_str()); data/knxd-0.14.35/src/common/loadimage.cpp:24:63: [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. GenAlloc (CArray & req, uint16_t start, uint16_t len, uint8_t access, data/knxd-0.14.35/src/common/loadimage.cpp:34: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. req[6] = access; data/knxd-0.14.35/src/examples/mpropdesc.c:27:17: [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. uint8_t type, access; data/knxd-0.14.35/src/examples/mpropdesc.c:45:62: [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. len = EIB_MC_PropertyDesc (con, obj, prop, &type, &count, &access); data/knxd-0.14.35/src/examples/mpropdesc.c:48:68: [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. printf ("Property: type:%d count:%d access:%02X\n", type, count, access); data/knxd-0.14.35/src/include/eibclient.h:663:36: [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. uint8_t * access); data/knxd-0.14.35/src/include/eibclient.h:676:69: [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. uint16_t * max_nr_of_elem, uint8_t * access); data/knxd-0.14.35/src/libserver/apdu.cpp:2385: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. pdu[8] = access; data/knxd-0.14.35/src/libserver/apdu.cpp:2404:14: [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. addHex (s, access); data/knxd-0.14.35/src/libserver/eibnetserver.cpp:485:15: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ifr.ifr_name, it->ifr_name); data/knxd-0.14.35/src/libserver/layer7.cpp:173:47: [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. uint8_t & access) data/knxd-0.14.35/src/libserver/layer7.cpp:186:16: [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. access = a1->access; data/knxd-0.14.35/src/libserver/layer7.h:73:34: [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. uint8_t & access); data/knxd-0.14.35/src/libserver/management.cpp:97:59: [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. (obj, p1.property, i, p1.type, p1.count, p1.access) == -1) data/knxd-0.14.35/src/libserver/management.h:44: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. uint8_t access; data/knxd-0.14.35/src/libserver/managementclient.cpp:468:36: [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. erg[ii + 7] = i->access; data/knxd-0.14.35/src/libserver/trace.h:183:10: [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. fmt::fprintf(stdout, msg, args ...); data/knxd-0.14.35/src/libserver/trace.h:201:10: [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. fmt::fprintf (stderr, msg, args...); data/knxd-0.14.35/src/server/knxd.cpp:57:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s,"%s_args",argv[0]); data/knxd-0.14.35/src/server/knxd.cpp:58:7: [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(s, argv); data/knxd-0.14.35/src/server/knxd.cpp:60:7: [4] (shell) execv: 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. execv(LIBEXECDIR "/knxd_args", argv); data/knxd-0.14.35/src/server/knxd.cpp:93:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf (stderr, msg, ap); data/knxd-0.14.35/src/server/knxd.cpp:152:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s,"%s_args",argv[0]); data/knxd-0.14.35/src/server/knxd.cpp:153:7: [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(s, argv); data/knxd-0.14.35/src/server/knxd.cpp:155:7: [4] (shell) execv: 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. execv(LIBEXECDIR "/knxd_args", argv); data/knxd-0.14.35/src/server/knxd_args.cpp:76: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(link+2,arg); data/knxd-0.14.35/src/server/knxd_args.cpp:272: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(cut,arg); data/knxd-0.14.35/src/server/knxd_args.cpp:315:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf (stderr, msg, ap); data/knxd-0.14.35/src/tools/bcu/bcuaddrtab.cpp:34:3: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf (msg, ap); data/knxd-0.14.35/src/tools/bcu/bcuread.cpp:34:3: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf (msg, ap); data/knxd-0.14.35/src/tools/common.c:39:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf (stderr, msg, ap); data/knxd-0.14.35/src/tools/eibnet/eibnetdescribe.cpp:34:3: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf (msg, ap); data/knxd-0.14.35/src/tools/eibnet/eibnetsearch.cpp:33:3: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf (msg, ap); data/knxd-0.14.35/src/tools/eibwrite-cgi.c:199:17: [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(data,value); data/knxd-0.14.35/src/tools/knxtool.c:1062:21: [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. uint8_t type, access; data/knxd-0.14.35/src/tools/knxtool.c:1077:66: [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. len = EIB_MC_PropertyDesc (con, obj, prop, &type, &count, &access); data/knxd-0.14.35/src/tools/knxtool.c:1081:15: [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. access); data/knxd-0.14.35/src/tools/knxtool.c:1604:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (path,"%s/%s", PKGLIBDIR, prog); data/knxd-0.14.35/src/tools/knxtool.c:1605:7: [4] (shell) execv: 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. execv (path, ag); data/knxd-0.14.35/src/backend/ncn5120.cpp:34:8: [3] (random) setstate: 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. void setstate(enum TSTATE state); data/knxd-0.14.35/src/backend/ncn5120.cpp:85:14: [3] (random) setstate: 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. NCN5120wrap::setstate(enum TSTATE new_state) data/knxd-0.14.35/src/backend/ncn5120.cpp:94:15: [3] (random) setstate: 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. TPUARTwrap::setstate(new_state); data/knxd-0.14.35/src/backend/tpuart.cpp:240:3: [3] (random) setstate: 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. setstate(T_new); data/knxd-0.14.35/src/backend/tpuart.cpp:241:3: [3] (random) setstate: 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. setstate(T_start); data/knxd-0.14.35/src/backend/tpuart.cpp:247:3: [3] (random) setstate: 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. setstate(T_new); data/knxd-0.14.35/src/backend/tpuart.cpp:289:7: [3] (random) setstate: 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. setstate(T_error); data/knxd-0.14.35/src/backend/tpuart.cpp:309:11: [3] (random) setstate: 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. setstate(T_in_reset); data/knxd-0.14.35/src/backend/tpuart.cpp:312:7: [3] (random) setstate: 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. setstate(T_error); data/knxd-0.14.35/src/backend/tpuart.cpp:321:7: [3] (random) setstate: 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. setstate(state); data/knxd-0.14.35/src/backend/tpuart.cpp:329:7: [3] (random) setstate: 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. setstate(T_in_getstate); data/knxd-0.14.35/src/backend/tpuart.cpp:334:7: [3] (random) setstate: 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. setstate(T_wait_keepalive); data/knxd-0.14.35/src/backend/tpuart.cpp:339:7: [3] (random) setstate: 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. setstate(T_wait); data/knxd-0.14.35/src/backend/tpuart.cpp:344:11: [3] (random) setstate: 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. setstate(T_in_reset); data/knxd-0.14.35/src/backend/tpuart.cpp:347:7: [3] (random) setstate: 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. setstate(T_wait_keepalive); data/knxd-0.14.35/src/backend/tpuart.cpp:403:9: [3] (random) setstate: 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. setstate(T_wait); data/knxd-0.14.35/src/backend/tpuart.cpp:405:9: [3] (random) setstate: 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. setstate(T_wait_more); data/knxd-0.14.35/src/backend/tpuart.cpp:441:15: [3] (random) setstate: 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. setstate(T_in_setaddr); data/knxd-0.14.35/src/backend/tpuart.cpp:479:15: [3] (random) setstate: 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. setstate(T_wait); data/knxd-0.14.35/src/backend/tpuart.cpp:490:15: [3] (random) setstate: 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. setstate(T_in_getstate); data/knxd-0.14.35/src/backend/tpuart.cpp:493:15: [3] (random) setstate: 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. setstate(T_is_online); data/knxd-0.14.35/src/backend/tpuart.cpp:525:13: [3] (random) setstate: 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. TPUARTwrap::setstate(enum TSTATE new_state) data/knxd-0.14.35/src/backend/tpuart.h:100:16: [3] (random) setstate: 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. virtual void setstate(enum TSTATE new_state); data/knxd-0.14.35/src/server/knxd.cpp:292:20: [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. using_systemd = (getenv("JOURNAL_STREAM") != NULL) && (getppid() == 1); data/knxd-0.14.35/src/tools/eibread-cgi.c:76:19: [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 *request = getenv("REQUEST_METHOD"); data/knxd-0.14.35/src/tools/eibread-cgi.c:85: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. cgi_str = getenv("QUERY_STRING"); data/knxd-0.14.35/src/tools/eibread-cgi.c:96:20: [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. contentlen = getenv("CONTENT_LENGTH"); data/knxd-0.14.35/src/tools/eibwrite-cgi.c:51:19: [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 *request = getenv("REQUEST_METHOD"); data/knxd-0.14.35/src/tools/eibwrite-cgi.c:60: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. cgi_str = getenv("QUERY_STRING"); data/knxd-0.14.35/src/tools/eibwrite-cgi.c:71:20: [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. contentlen = getenv("CONTENT_LENGTH"); data/knxd-0.14.35/src/backend/log.cpp:258: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 x[15]; data/knxd-0.14.35/src/backend/log.cpp:259: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(x,"SendLocal %d",raw); data/knxd-0.14.35/src/backend/log.cpp:266: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 x[15]; data/knxd-0.14.35/src/backend/log.cpp:267: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(x,"DoSendLocal %d",raw); data/knxd-0.14.35/src/backend/tpuart.cpp:74: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 buf[2][10]; data/knxd-0.14.35/src/backend/tpuart.cpp:101:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf[x],"? %d",s); data/knxd-0.14.35/src/client/c/eibclient-int.h:128:9: [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 (con->req.buf, con->buf + offset, i); \ data/knxd-0.14.35/src/client/c/eibclient-int.h:211:9: [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 (ibuf, head, ilen); \ data/knxd-0.14.35/src/client/c/eibclient-int.h:212:9: [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 (ibuf + ilen, name, name ## _len); \ data/knxd-0.14.35/src/client/c/eibclient-int.h:286:9: [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 (ibuf + offset, value, 4); data/knxd-0.14.35/src/client/c/openurl.c:60: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). port = atoi (b + 1); data/knxd-0.14.35/src/common/image.cpp:29: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[200]; data/knxd-0.14.35/src/common/image.cpp:32: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 (buf, "%04X ", 0); data/knxd-0.14.35/src/common/image.cpp:36:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (buf, "%02x ", data[i]); data/knxd-0.14.35/src/common/image.cpp:40: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 (buf, "\n%04X ", i + 1); data/knxd-0.14.35/src/common/image.cpp:118: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[200]; data/knxd-0.14.35/src/common/image.cpp:120: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 (buf, "Invalid:\n"); data/knxd-0.14.35/src/common/image.cpp:150: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[200]; data/knxd-0.14.35/src/common/image.cpp:152: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 (buf, "Unknown %04x:\n", type); data/knxd-0.14.35/src/common/image.cpp:184: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[200]; data/knxd-0.14.35/src/common/image.cpp:185: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 (buf, "Maskversion: %04x\n", bcutype); data/knxd-0.14.35/src/common/image.cpp:213: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[200]; data/knxd-0.14.35/src/common/image.cpp:215: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 (buf, "Code:\n"); data/knxd-0.14.35/src/common/image.cpp:260: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[200]; data/knxd-0.14.35/src/common/image.cpp:305: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[200]; data/knxd-0.14.35/src/common/image.cpp:348: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[200]; data/knxd-0.14.35/src/common/image.cpp:421: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[200]; data/knxd-0.14.35/src/common/image.cpp:455: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[200]; data/knxd-0.14.35/src/common/image.cpp:511: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[200]; data/knxd-0.14.35/src/common/image.cpp:512: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 (buf, "BCU1_SIZE: text:%d stack:%d data:%d bss:%d\n", textsize, data/knxd-0.14.35/src/common/image.cpp:559: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[200]; data/knxd-0.14.35/src/common/image.cpp:560: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 (buf, data/knxd-0.14.35/src/common/image.cpp:656: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[600]; data/knxd-0.14.35/src/common/image.cpp:657: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 (buf, data/knxd-0.14.35/src/common/image.cpp:712: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[200]; data/knxd-0.14.35/src/common/image.cpp:715: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 (buf, "BCU2_KEY: install:%08X ", installkey); data/knxd-0.14.35/src/common/image.cpp:719:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (buf, "level%d: %08X ", i, keys[i]); data/knxd-0.14.35/src/common/inifile.cpp:242:15: [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). else if (fb.open (filename,std::ios::in)) data/knxd-0.14.35/src/common/inih.c:80:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[INI_MAX_LINE]; data/knxd-0.14.35/src/common/inih.c:84: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 section[MAX_SECTION] = ""; data/knxd-0.14.35/src/common/inih.c:85: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 prev_name[MAX_NAME] = ""; data/knxd-0.14.35/src/common/inih.c:233: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). file = fopen(filename, "r"); data/knxd-0.14.35/src/examples/groupcachelastupdates.c:37:11: [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). start = atoi (ag[2]); data/knxd-0.14.35/src/examples/groupcachelastupdates.c:38: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). timeout = atoi (ag[3]); data/knxd-0.14.35/src/examples/groupcachereadsync.c:38:11: [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). age = atoi (ag[3]); data/knxd-0.14.35/src/examples/madcread.c:37: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). channel = atoi (ag[3]); data/knxd-0.14.35/src/examples/madcread.c:38: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). len = atoi (ag[4]); data/knxd-0.14.35/src/examples/mpropdesc.c:38: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). obj = atoi (ag[3]); data/knxd-0.14.35/src/examples/mpropdesc.c:39: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). prop = atoi (ag[4]); data/knxd-0.14.35/src/examples/mpropread.c:37: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). obj = atoi (ag[3]); data/knxd-0.14.35/src/examples/mpropread.c:38: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). prop = atoi (ag[4]); data/knxd-0.14.35/src/examples/mpropread.c:39:11: [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). start = atoi (ag[5]); data/knxd-0.14.35/src/examples/mpropread.c:40: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). nr_of_elem = atoi (ag[6]); data/knxd-0.14.35/src/examples/mpropwrite.c:40: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). obj = atoi (ag[3]); data/knxd-0.14.35/src/examples/mpropwrite.c:41: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). prop = atoi (ag[4]); data/knxd-0.14.35/src/examples/mpropwrite.c:42:11: [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). start = atoi (ag[5]); data/knxd-0.14.35/src/examples/mpropwrite.c:43: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). nr_of_elem = atoi (ag[6]); data/knxd-0.14.35/src/examples/mread.c:38: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). len = atoi (ag[4]); data/knxd-0.14.35/src/examples/msetkey.c:37:11: [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). level = atoi (ag[3]); data/knxd-0.14.35/src/examples/vbusmonitor1time.c:32: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 time_string[40]; data/knxd-0.14.35/src/examples/xpropread.c:36: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). obj = atoi (ag[3]); data/knxd-0.14.35/src/examples/xpropread.c:37: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). prop = atoi (ag[4]); data/knxd-0.14.35/src/examples/xpropread.c:38:11: [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). start = atoi (ag[5]); data/knxd-0.14.35/src/examples/xpropread.c:39: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). nr_of_elem = atoi (ag[6]); data/knxd-0.14.35/src/examples/xpropwrite.c:37: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). obj = atoi (ag[3]); data/knxd-0.14.35/src/examples/xpropwrite.c:38: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). prop = atoi (ag[4]); data/knxd-0.14.35/src/examples/xpropwrite.c:39:11: [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). start = atoi (ag[5]); data/knxd-0.14.35/src/examples/xpropwrite.c:40: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). nr_of_elem = atoi (ag[6]); data/knxd-0.14.35/src/libserver/common.cpp:38: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[255]; data/knxd-0.14.35/src/libserver/common.cpp:39: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 (buf, "%d.%d.%d", (addr >> 12) & 0xf, (addr >> 8) & 0xf, data/knxd-0.14.35/src/libserver/common.cpp:47: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[255]; data/knxd-0.14.35/src/libserver/common.cpp:48: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 (buf, "%d/%d/%d", (addr >> 11) & 0x1f, (addr >> 8) & 0x7, data/knxd-0.14.35/src/libserver/common.cpp:56: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[255]; data/knxd-0.14.35/src/libserver/common.cpp:57: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 (buf, "%04X", addr); data/knxd-0.14.35/src/libserver/common.cpp:64: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[255]; data/knxd-0.14.35/src/libserver/common.cpp:65: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 (buf, "%08X", key); data/knxd-0.14.35/src/libserver/common.cpp:72: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[4]; data/knxd-0.14.35/src/libserver/common.cpp:73: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 (buf, "%02X ", c); data/knxd-0.14.35/src/libserver/common.cpp:80: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[6]; data/knxd-0.14.35/src/libserver/common.cpp:81: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 (buf, "%04X ", c); data/knxd-0.14.35/src/libserver/eibnetip.cpp:394:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&r.serial, p.data.data() + 16, 6); data/knxd-0.14.35/src/libserver/eibnetip.cpp:395:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&r.multicastaddr, p.data.data() + 22, 4); data/knxd-0.14.35/src/libserver/eibnetip.cpp:396:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&r.MAC, p.data.data() + 26, 6); data/knxd-0.14.35/src/libserver/eibnetip.cpp:397:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&r.name, p.data.data() + 32, 30); data/knxd-0.14.35/src/libserver/eibnetip.cpp:497:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&r.serial, p.data.data() + 8, 6); data/knxd-0.14.35/src/libserver/eibnetip.cpp:498:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&r.multicastaddr, p.data.data() + 14, 4); data/knxd-0.14.35/src/libserver/eibnetip.cpp:499:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&r.MAC, p.data.data() + 18, 6); data/knxd-0.14.35/src/libserver/eibnetip.cpp:500:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&r.name, p.data.data() + 24, 30); data/knxd-0.14.35/src/libserver/eibnetip.h:196: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 name[30]; data/knxd-0.14.35/src/libserver/eibnetip.h:229: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 name[30]; data/knxd-0.14.35/src/libserver/eibnetserver.cpp:470:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/knxd-0.14.35/src/libserver/eibnetserver.cpp:471: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. unsigned char mac_address[IFHWADDRLEN]= {0,0,0,0,0,0}; data/knxd-0.14.35/src/libserver/ipsupport.cpp:71:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char data[1000]; data/knxd-0.14.35/src/libserver/ipsupport.cpp:96:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (RTA_DATA (a), &dest->sin_addr.s_addr, data/knxd-0.14.35/src/libserver/ipsupport.cpp:112:11: [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 (&src->sin_addr.s_addr, RTA_DATA (a), RTA_PAYLOAD (a)); data/knxd-0.14.35/src/libserver/ipsupport.cpp:168:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char data[1000]; data/knxd-0.14.35/src/libserver/ipsupport.cpp:201:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (cp, dest, sizeof (*dest)); data/knxd-0.14.35/src/libserver/link.cpp:483: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 n[10]; data/knxd-0.14.35/src/libserver/link.cpp:484: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(n,"%d",t->seq); data/knxd-0.14.35/src/libserver/llserial.cpp:80:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open (dev.c_str(), O_RDWR | O_NOCTTY | O_NDELAY | O_SYNC); data/knxd-0.14.35/src/libserver/llserial.cpp:95:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open (dev.c_str(), O_RDWR | O_NOCTTY | O_SYNC); data/knxd-0.14.35/src/server/knxd.cpp:56:18: [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 = (char *)malloc(strlen(argv[0])+7); data/knxd-0.14.35/src/server/knxd.cpp:151:18: [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 = (char *)malloc(strlen(argv[0])+7); data/knxd-0.14.35/src/server/knxd.cpp:254:16: [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). int fd = open (hup->logfile, O_WRONLY | O_APPEND | O_CREAT, 0660); data/knxd-0.14.35/src/server/knxd.cpp:385: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). int fd = open("/dev/null", O_RDONLY); data/knxd-0.14.35/src/server/knxd.cpp:393: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). fd = open (logfile, O_WRONLY | O_APPEND | O_CREAT, 0660); data/knxd-0.14.35/src/server/knxd.cpp:452: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 ((pidf = fopen (pidfile, "w")) != NULL) data/knxd-0.14.35/src/server/knxd_args.cpp:71: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 link[99] = "@."; data/knxd-0.14.35/src/server/knxd_args.cpp:179: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 buf[15]; data/knxd-0.14.35/src/server/knxd_args.cpp:199: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 b1[12],b2[50]; data/knxd-0.14.35/src/server/knxd_args.cpp:271:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cut[20]; data/knxd-0.14.35/src/server/knxd_args.cpp:524: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). if (atoi (b) > 0) data/knxd-0.14.35/src/server/knxd_args.cpp:583: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 (*port && atoi(port) > 0) data/knxd-0.14.35/src/server/knxd_args.cpp:611:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). arguments->errorlevel = (arg ? atoi (arg) : 0); data/knxd-0.14.35/src/server/knxd_args.cpp:658:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). arguments->l2opts.send_delay = atoi(OPT_ARG(arg,state,"30")); data/knxd-0.14.35/src/tools/bcu/bcuaddrtab.cpp:132:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). arguments->tracelevel = (arg ? atoi (arg) : 0); data/knxd-0.14.35/src/tools/bcu/bcuaddrtab.cpp:135:35: [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). arguments->timeout = (arg ? atoi (arg) : 0); data/knxd-0.14.35/src/tools/bcu/bcuaddrtab.cpp:138:37: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). arguments->newlength = (arg ? atoi (arg) : 0); data/knxd-0.14.35/src/tools/bcu/bcuread.cpp:132:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). arguments->tracelevel = (arg ? atoi (arg) : 0); data/knxd-0.14.35/src/tools/bcu/bcuread.cpp:173: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). len = atoi (ag[index + 2]); data/knxd-0.14.35/src/tools/eibnet/eibnetdescribe.cpp:93: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). tracelevel = atoi (ag[2]); data/knxd-0.14.35/src/tools/eibnet/eibnetdescribe.cpp:110: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). sport = atoi (c + 1); data/knxd-0.14.35/src/tools/eibnet/eibnetdescribe.cpp:112: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). dport = atoi (b + 1); data/knxd-0.14.35/src/tools/eibnet/eibnetsearch.cpp:111: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). tracelevel = atoi (ag[2]); data/knxd-0.14.35/src/tools/eibnet/eibnetsearch.cpp:133: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). sport = atoi (c + 1); data/knxd-0.14.35/src/tools/eibnet/eibnetsearch.cpp:135: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). dport = atoi (b + 1); data/knxd-0.14.35/src/tools/eibread-cgi.c:37: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 *eiburl[256]; data/knxd-0.14.35/src/tools/eibread-cgi.c:101:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). size = (unsigned long) atoi(contentlen); data/knxd-0.14.35/src/tools/eibread-cgi.c:169: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[BUFSIZE], *tok; data/knxd-0.14.35/src/tools/eibread-cgi.c:173: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(fname,"r")) == NULL) data/knxd-0.14.35/src/tools/eibread-cgi.c:230: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). lastpos=atoi(value); data/knxd-0.14.35/src/tools/eibread-cgi.c:234: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). timeout=atoi(value); data/knxd-0.14.35/src/tools/eibread-cgi.c:247:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int v = atoi(value); data/knxd-0.14.35/src/tools/eibread-cgi.c:280: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[10000]; data/knxd-0.14.35/src/tools/eibread-cgi.c:299:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(outptr,"{\"d\": {"); data/knxd-0.14.35/src/tools/eibwrite-cgi.c:36: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 *eiburl[256]; data/knxd-0.14.35/src/tools/eibwrite-cgi.c:37: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 data[50]; data/knxd-0.14.35/src/tools/eibwrite-cgi.c:76:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). size = (unsigned long) atoi(contentlen); data/knxd-0.14.35/src/tools/eibwrite-cgi.c:146: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 *valuepairs[MAX_GA]; data/knxd-0.14.35/src/tools/eibwrite-cgi.c:183: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). gadest=atoi(value); data/knxd-0.14.35/src/tools/eibwrite-cgi.c:192:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). dpt=atoi(value); data/knxd-0.14.35/src/tools/eibwrite-cgi.c:222: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 tmpbuf[255]; data/knxd-0.14.35/src/tools/eibwrite-cgi.c:256: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). buf[1] |= atoi(data) & 0x3f; data/knxd-0.14.35/src/tools/eibwrite-cgi.c:261: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). buf[1] |= atoi(data) & 0x3f; data/knxd-0.14.35/src/tools/eibwrite-cgi.c:265: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). buf[2] = atoi(data)*255/100; data/knxd-0.14.35/src/tools/eibwrite-cgi.c:270: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). buf[2] = atoi(data); data/knxd-0.14.35/src/tools/knxtool.c:314: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). int time = atoi(ag[3]); data/knxd-0.14.35/src/tools/knxtool.c:379:15: [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 logfile[32]; data/knxd-0.14.35/src/tools/knxtool.c:386:37: [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 (NULL == (new_fd = fopen (logfile, "a"))) data/knxd-0.14.35/src/tools/knxtool.c:515: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). start = atoi (ag[2]); data/knxd-0.14.35/src/tools/knxtool.c:516: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). timeout = atoi (ag[3]); data/knxd-0.14.35/src/tools/knxtool.c:572: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). age = atoi (ag[3]); data/knxd-0.14.35/src/tools/knxtool.c:932: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). channel = atoi (ag[3]); data/knxd-0.14.35/src/tools/knxtool.c:933: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). len = atoi (ag[4]); data/knxd-0.14.35/src/tools/knxtool.c:1070: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). obj = atoi (ag[3]); data/knxd-0.14.35/src/tools/knxtool.c:1071: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). prop = atoi (ag[4]); data/knxd-0.14.35/src/tools/knxtool.c:1093: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). obj = atoi (ag[3]); data/knxd-0.14.35/src/tools/knxtool.c:1094: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). prop = atoi (ag[4]); data/knxd-0.14.35/src/tools/knxtool.c:1095: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). start = atoi (ag[5]); data/knxd-0.14.35/src/tools/knxtool.c:1096: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). nr_of_elem = atoi (ag[6]); data/knxd-0.14.35/src/tools/knxtool.c:1197: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). obj = atoi (ag[3]); data/knxd-0.14.35/src/tools/knxtool.c:1198: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). prop = atoi (ag[4]); data/knxd-0.14.35/src/tools/knxtool.c:1199: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). start = atoi (ag[5]); data/knxd-0.14.35/src/tools/knxtool.c:1200: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). nr_of_elem = atoi (ag[6]); data/knxd-0.14.35/src/tools/knxtool.c:1229: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). len = atoi (ag[4]); data/knxd-0.14.35/src/tools/knxtool.c:1267: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). level = atoi (ag[3]); data/knxd-0.14.35/src/tools/knxtool.c:1459:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char time_string[40]; data/knxd-0.14.35/src/tools/knxtool.c:1556: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). obj = atoi (ag[3]); data/knxd-0.14.35/src/tools/knxtool.c:1557: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). prop = atoi (ag[4]); data/knxd-0.14.35/src/tools/knxtool.c:1558: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). start = atoi (ag[5]); data/knxd-0.14.35/src/tools/knxtool.c:1559: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). nr_of_elem = atoi (ag[6]); data/knxd-0.14.35/src/tools/knxtool.c:1580: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). obj = atoi (ag[3]); data/knxd-0.14.35/src/tools/knxtool.c:1581: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). prop = atoi (ag[4]); data/knxd-0.14.35/src/tools/knxtool.c:1582: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). start = atoi (ag[5]); data/knxd-0.14.35/src/tools/knxtool.c:1583: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). nr_of_elem = atoi (ag[6]); data/knxd-0.14.35/src/usb/findknxusb.cpp:35: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 vendor[512]; data/knxd-0.14.35/src/usb/findknxusb.cpp:36: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 product[512]; data/knxd-0.14.35/src/usb/findknxusb.cpp:93:21: [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 (vendor, "<Unreadable>"); data/knxd-0.14.35/src/usb/findknxusb.cpp:97:21: [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 (product, "<Unreadable>"); data/knxd-0.14.35/src/client/c/io.c:106:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read (con->fd, &head + con->readlen, 2 - con->readlen); data/knxd-0.14.35/src/client/c/io.c:141:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read (con->fd, con->buf + (con->readlen - 2), data/knxd-0.14.35/src/client/c/openlocal.c:44:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (addr.sun_path, path, sizeof (addr.sun_path)); data/knxd-0.14.35/src/common/inih.c:30:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char* p = s + strlen(s); data/knxd-0.14.35/src/common/inih.c:69:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dest, src, size); data/knxd-0.14.35/src/common/iobuf.cpp:93:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int i = ::read(fd, recvbuf+recvpos, quick ? 1 : (sizeof(recvbuf)-recvpos)); data/knxd-0.14.35/src/examples/groupreadresponse.c:30:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fd_set read; data/knxd-0.14.35/src/examples/groupreadresponse.c:57:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). FD_ZERO (&read); data/knxd-0.14.35/src/examples/groupreadresponse.c:58:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). FD_SET (EIB_Poll_FD (con), &read); data/knxd-0.14.35/src/examples/groupreadresponse.c:60:43: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (select (EIB_Poll_FD (con) + 1, &read, 0, 0, &tv) == -1) data/knxd-0.14.35/src/examples/mpropscanpoll.c:29:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fd_set read; data/knxd-0.14.35/src/examples/mpropscanpoll.c:49:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). FD_ZERO (&read); data/knxd-0.14.35/src/examples/mpropscanpoll.c:50:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). FD_SET (EIB_Poll_FD (con), &read); data/knxd-0.14.35/src/examples/mpropscanpoll.c:52:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (select (EIB_Poll_FD (con) + 1, &read, 0, 0, 0) == -1) data/knxd-0.14.35/src/examples/vbusmonitor1poll.c:27:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fd_set read; data/knxd-0.14.35/src/examples/vbusmonitor1poll.c:40:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). FD_ZERO (&read); data/knxd-0.14.35/src/examples/vbusmonitor1poll.c:41:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). FD_SET (EIB_Poll_FD (con), &read); data/knxd-0.14.35/src/examples/vbusmonitor1poll.c:43:43: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (select (EIB_Poll_FD (con) + 1, &read, 0, 0, 0) == -1) data/knxd-0.14.35/src/libserver/eibnetserver.cpp:569:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ((char *) r2.name, servername.c_str(), sizeof(r2.name) - 1); data/knxd-0.14.35/src/libserver/eibnetserver.cpp:608:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ((char *) r2.name, servername.c_str(), sizeof(r2.name) - 1); data/knxd-0.14.35/src/libserver/ipsupport.cpp:100:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read (s, &req, sizeof (req)) < 0) data/knxd-0.14.35/src/libserver/ipsupport.cpp:204:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read (s, (char *) &req, sizeof (req)) < 0) data/knxd-0.14.35/src/libserver/localserver.cpp:56:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (addr.sun_path, path.c_str(), sizeof (addr.sun_path) - 1); data/knxd-0.14.35/src/server/knxd.cpp:56:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *s = (char *)malloc(strlen(argv[0])+7); data/knxd-0.14.35/src/server/knxd.cpp:151:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *s = (char *)malloc(strlen(argv[0])+7); data/knxd-0.14.35/src/server/knxd.cpp:368:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pidfile, PidFile.c_str(), PidFile.length()); data/knxd-0.14.35/src/server/knxd.cpp:374:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(logfile, LogFile.c_str(),LogFile.length()); data/knxd-0.14.35/src/server/knxd_args.cpp:273:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cut[strlen(cut)-3] = 0; // drop the "tcp" at the end data/knxd-0.14.35/src/server/knxd_args.cpp:549:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(arg) >= 30) data/knxd-0.14.35/src/tools/bcu/bcuaddrtab.cpp:71:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (u->prefix) == p && !memcmp (u->prefix, url, p)) data/knxd-0.14.35/src/tools/bcu/bcuread.cpp:71:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (u->prefix) == p && !memcmp (u->prefix, url, p)) data/knxd-0.14.35/src/tools/eibread-cgi.c:300:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). outptr += strlen(outptr); data/knxd-0.14.35/src/tools/eibwrite-cgi.c:156:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). valuepairs[i] = (char *)malloc(strlen(params)+1); data/knxd-0.14.35/src/tools/eibwrite-cgi.c:198:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( value != NULL && strlen(value)<50 ) data/knxd-0.14.35/src/tools/eibwrite-cgi.c:237:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!gadest || !(strlen(data)>0)) data/knxd-0.14.35/src/tools/eibwrite-cgi.c:243:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for(i = 0; i < strlen(data)/2; i++) data/knxd-0.14.35/src/tools/eibwrite-cgi.c:291: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). for (i=0; i<strlen(data); i++) data/knxd-0.14.35/src/tools/knxtool.c:331:11: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep (step); data/knxd-0.14.35/src/tools/knxtool.c:684:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fd_set read; data/knxd-0.14.35/src/tools/knxtool.c:705:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). FD_ZERO (&read); data/knxd-0.14.35/src/tools/knxtool.c:706:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). FD_SET (EIB_Poll_FD (con), &read); data/knxd-0.14.35/src/tools/knxtool.c:708:47: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (select (EIB_Poll_FD (con) + 1, &read, 0, 0, &tv) == -1) data/knxd-0.14.35/src/tools/knxtool.c:1140:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fd_set read; data/knxd-0.14.35/src/tools/knxtool.c:1158:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). FD_ZERO (&read); data/knxd-0.14.35/src/tools/knxtool.c:1159:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). FD_SET (EIB_Poll_FD (con), &read); data/knxd-0.14.35/src/tools/knxtool.c:1161:43: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (select (EIB_Poll_FD (con) + 1, &read, 0, 0, 0) == -1) data/knxd-0.14.35/src/tools/knxtool.c:1422:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fd_set read; data/knxd-0.14.35/src/tools/knxtool.c:1434:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). FD_ZERO (&read); data/knxd-0.14.35/src/tools/knxtool.c:1435:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). FD_SET (EIB_Poll_FD (con), &read); data/knxd-0.14.35/src/tools/knxtool.c:1437:47: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (select (EIB_Poll_FD (con) + 1, &read, 0, 0, 0) == -1) data/knxd-0.14.35/src/tools/knxtool.c:1603:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *path = malloc (strlen (PKGLIBDIR) + strlen (prog) + 2); data/knxd-0.14.35/src/tools/knxtool.c:1603:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *path = malloc (strlen (PKGLIBDIR) + strlen (prog) + 2); ANALYSIS SUMMARY: Hits = 306 Lines analyzed = 39080 in approximately 3.50 seconds (11170 lines/second) Physical Source Lines of Code (SLOC) = 28459 Hits@level = [0] 370 [1] 52 [2] 179 [3] 30 [4] 45 [5] 0 Hits@level+ = [0+] 676 [1+] 306 [2+] 254 [3+] 75 [4+] 45 [5+] 0 Hits/KSLOC@level+ = [0+] 23.7535 [1+] 10.7523 [2+] 8.92512 [3+] 2.63537 [4+] 1.58122 [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.