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/libcommoncpp2-1.8.1/demo/buffer.cpp Examining data/libcommoncpp2-1.8.1/demo/test_alog.cpp Examining data/libcommoncpp2-1.8.1/demo/dccpserver.cpp Examining data/libcommoncpp2-1.8.1/demo/xmlfetch.cpp Examining data/libcommoncpp2-1.8.1/demo/dccpclient.cpp Examining data/libcommoncpp2-1.8.1/demo/serialecho.h Examining data/libcommoncpp2-1.8.1/demo/timer.cpp Examining data/libcommoncpp2-1.8.1/demo/SampleSocketPort.h Examining data/libcommoncpp2-1.8.1/demo/slogTest.cpp Examining data/libcommoncpp2-1.8.1/demo/tcp.cpp Examining data/libcommoncpp2-1.8.1/demo/dir.cpp Examining data/libcommoncpp2-1.8.1/demo/str.cpp Examining data/libcommoncpp2-1.8.1/demo/cmdlineopt.cpp Examining data/libcommoncpp2-1.8.1/demo/serialecho.cpp Examining data/libcommoncpp2-1.8.1/demo/keydump.cpp Examining data/libcommoncpp2-1.8.1/demo/tcpservice.cpp Examining data/libcommoncpp2-1.8.1/demo/netdevices.cpp Examining data/libcommoncpp2-1.8.1/demo/urlfetch.cpp Examining data/libcommoncpp2-1.8.1/demo/tcpthread.cpp Examining data/libcommoncpp2-1.8.1/demo/serialmain.cpp Examining data/libcommoncpp2-1.8.1/demo/SampleSocketPort.cpp Examining data/libcommoncpp2-1.8.1/demo/crc32.cpp Examining data/libcommoncpp2-1.8.1/src/md5.cpp Examining data/libcommoncpp2-1.8.1/src/in6addr.cpp Examining data/libcommoncpp2-1.8.1/src/map.cpp Examining data/libcommoncpp2-1.8.1/src/buffer.cpp Examining data/libcommoncpp2-1.8.1/src/numbers.cpp Examining data/libcommoncpp2-1.8.1/src/persist.cpp Examining data/libcommoncpp2-1.8.1/src/process.cpp Examining data/libcommoncpp2-1.8.1/src/getopt.c Examining data/libcommoncpp2-1.8.1/src/getopt.h Examining data/libcommoncpp2-1.8.1/src/url.cpp Examining data/libcommoncpp2-1.8.1/src/friends.cpp Examining data/libcommoncpp2-1.8.1/src/missing.cpp Examining data/libcommoncpp2-1.8.1/src/engine.cpp Examining data/libcommoncpp2-1.8.1/src/nat.cpp Examining data/libcommoncpp2-1.8.1/src/exception.cpp Examining data/libcommoncpp2-1.8.1/src/zstream.cpp Examining data/libcommoncpp2-1.8.1/src/timer.cpp Examining data/libcommoncpp2-1.8.1/src/tokenizer.cpp Examining data/libcommoncpp2-1.8.1/src/linked.cpp Examining data/libcommoncpp2-1.8.1/src/threadkey.cpp Examining data/libcommoncpp2-1.8.1/src/assoc.cpp Examining data/libcommoncpp2-1.8.1/src/strchar.cpp Examining data/libcommoncpp2-1.8.1/src/urlstring.cpp Examining data/libcommoncpp2-1.8.1/src/event.cpp Examining data/libcommoncpp2-1.8.1/src/dir.cpp Examining data/libcommoncpp2-1.8.1/src/string.cpp Examining data/libcommoncpp2-1.8.1/src/cmdoptns.cpp Examining data/libcommoncpp2-1.8.1/src/network.cpp Examining data/libcommoncpp2-1.8.1/src/keydata.cpp Examining data/libcommoncpp2-1.8.1/src/lockfile.cpp Examining data/libcommoncpp2-1.8.1/src/pointer.cpp Examining data/libcommoncpp2-1.8.1/src/digest.cpp Examining data/libcommoncpp2-1.8.1/src/mempager.cpp Examining data/libcommoncpp2-1.8.1/src/file.cpp Examining data/libcommoncpp2-1.8.1/src/xml.cpp Examining data/libcommoncpp2-1.8.1/src/mutex.cpp Examining data/libcommoncpp2-1.8.1/src/dso.cpp Examining data/libcommoncpp2-1.8.1/src/runlist.cpp Examining data/libcommoncpp2-1.8.1/src/private.h Examining data/libcommoncpp2-1.8.1/src/ssl.cpp Examining data/libcommoncpp2-1.8.1/src/nat.h Examining data/libcommoncpp2-1.8.1/src/serial.cpp Examining data/libcommoncpp2-1.8.1/src/socket.cpp Examining data/libcommoncpp2-1.8.1/src/unix.cpp Examining data/libcommoncpp2-1.8.1/src/socketport.cpp Examining data/libcommoncpp2-1.8.1/src/getopt1.c Examining data/libcommoncpp2-1.8.1/src/peer.cpp Examining data/libcommoncpp2-1.8.1/src/thread.cpp Examining data/libcommoncpp2-1.8.1/src/semaphore.cpp Examining data/libcommoncpp2-1.8.1/src/date.cpp Examining data/libcommoncpp2-1.8.1/src/slog.cpp Examining data/libcommoncpp2-1.8.1/src/simplesocket.cpp Examining data/libcommoncpp2-1.8.1/src/mime.cpp Examining data/libcommoncpp2-1.8.1/src/applog.cpp Examining data/libcommoncpp2-1.8.1/src/cidr.cpp Examining data/libcommoncpp2-1.8.1/src/inaddr.cpp Examining data/libcommoncpp2-1.8.1/w32/cc++/config.h Examining data/libcommoncpp2-1.8.1/inc/cc++/numbers.h Examining data/libcommoncpp2-1.8.1/inc/cc++/tokenizer.h Examining data/libcommoncpp2-1.8.1/inc/cc++/buffer.h Examining data/libcommoncpp2-1.8.1/inc/cc++/network.h Examining data/libcommoncpp2-1.8.1/inc/cc++/ssl.h Examining data/libcommoncpp2-1.8.1/inc/cc++/persist.h Examining data/libcommoncpp2-1.8.1/inc/cc++/applog.h Examining data/libcommoncpp2-1.8.1/inc/cc++/pointer.h Examining data/libcommoncpp2-1.8.1/inc/cc++/counter.h Examining data/libcommoncpp2-1.8.1/inc/cc++/process.h Examining data/libcommoncpp2-1.8.1/inc/cc++/objcount.h Examining data/libcommoncpp2-1.8.1/inc/cc++/object.h Examining data/libcommoncpp2-1.8.1/inc/cc++/cmdoptns.h Examining data/libcommoncpp2-1.8.1/inc/cc++/template.h Examining data/libcommoncpp2-1.8.1/inc/cc++/objlink.h Examining data/libcommoncpp2-1.8.1/inc/cc++/functions.h Examining data/libcommoncpp2-1.8.1/inc/cc++/serial.h Examining data/libcommoncpp2-1.8.1/inc/cc++/mime.h Examining data/libcommoncpp2-1.8.1/inc/cc++/thread.h Examining data/libcommoncpp2-1.8.1/inc/cc++/slog.h Examining data/libcommoncpp2-1.8.1/inc/cc++/exception.h Examining data/libcommoncpp2-1.8.1/inc/cc++/xml.h Examining data/libcommoncpp2-1.8.1/inc/cc++/export.h Examining data/libcommoncpp2-1.8.1/inc/cc++/url.h Examining data/libcommoncpp2-1.8.1/inc/cc++/zstream.h Examining data/libcommoncpp2-1.8.1/inc/cc++/digest.h Examining data/libcommoncpp2-1.8.1/inc/cc++/missing.h Examining data/libcommoncpp2-1.8.1/inc/cc++/objsync.h Examining data/libcommoncpp2-1.8.1/inc/cc++/misc.h Examining data/libcommoncpp2-1.8.1/inc/cc++/objmap.h Examining data/libcommoncpp2-1.8.1/inc/cc++/oststring.h Examining data/libcommoncpp2-1.8.1/inc/cc++/strchar.h Examining data/libcommoncpp2-1.8.1/inc/cc++/common.h Examining data/libcommoncpp2-1.8.1/inc/cc++/address.h Examining data/libcommoncpp2-1.8.1/inc/cc++/socket.h Examining data/libcommoncpp2-1.8.1/inc/cc++/socketport.h Examining data/libcommoncpp2-1.8.1/inc/cc++/unix.h Examining data/libcommoncpp2-1.8.1/inc/cc++/file.h Examining data/libcommoncpp2-1.8.1/inc/cc++/string.h Examining data/libcommoncpp2-1.8.1/tests/SampleObject.h Examining data/libcommoncpp2-1.8.1/tests/bug2.cpp Examining data/libcommoncpp2-1.8.1/tests/url1.cpp Examining data/libcommoncpp2-1.8.1/tests/ccxx_tests.cpp Examining data/libcommoncpp2-1.8.1/tests/thread1.cpp Examining data/libcommoncpp2-1.8.1/tests/Test_Engine.cpp Examining data/libcommoncpp2-1.8.1/tests/Test_Date.h Examining data/libcommoncpp2-1.8.1/tests/Test_TCPStream.h Examining data/libcommoncpp2-1.8.1/tests/Test_TCPStream.cpp Examining data/libcommoncpp2-1.8.1/tests/Test_Digest.h Examining data/libcommoncpp2-1.8.1/tests/Test_SHATumbler.h Examining data/libcommoncpp2-1.8.1/tests/Test_URLString.h Examining data/libcommoncpp2-1.8.1/tests/Test_URLString.cpp Examining data/libcommoncpp2-1.8.1/tests/bug1.cpp Examining data/libcommoncpp2-1.8.1/tests/tcpstr1.cpp Examining data/libcommoncpp2-1.8.1/tests/forever.cpp Examining data/libcommoncpp2-1.8.1/tests/digest.cpp Examining data/libcommoncpp2-1.8.1/tests/SampleObject.cpp Examining data/libcommoncpp2-1.8.1/tests/thread2.cpp Examining data/libcommoncpp2-1.8.1/tests/SampleSubObject.cpp Examining data/libcommoncpp2-1.8.1/tests/thread3.cpp Examining data/libcommoncpp2-1.8.1/tests/Test_Date.cpp Examining data/libcommoncpp2-1.8.1/tests/Test_Engine.h Examining data/libcommoncpp2-1.8.1/tests/SampleSubObject.h FINAL RESULTS: data/libcommoncpp2-1.8.1/src/file.cpp:1876:20: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. slen = readlink(buffer, symlink, size); data/libcommoncpp2-1.8.1/demo/cmdlineopt.cpp:204:11: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if ( ::access( values[ numValue - 1 ], R_OK ) ) { data/libcommoncpp2-1.8.1/demo/cmdlineopt.cpp:246:5: [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( test_restoargs.values[0], (char**) test_restoargs.values ); data/libcommoncpp2-1.8.1/inc/cc++/file.h:403: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. Access access; data/libcommoncpp2-1.8.1/inc/cc++/slog.h:137:11: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. FILE *syslog; data/libcommoncpp2-1.8.1/inc/cc++/socket.h:1826:12: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. size_t printf(const char *format, ...); data/libcommoncpp2-1.8.1/src/applog.cpp:921:29: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. logIt->second._msgpos = vsnprintf(logIt->second._msgbuf, logStruct::BUFF_SIZE, format, args); data/libcommoncpp2-1.8.1/src/applog.cpp:950:29: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. logIt->second._msgpos = vsnprintf(logIt->second._msgbuf, logStruct::BUFF_SIZE, format, args); data/libcommoncpp2-1.8.1/src/applog.cpp:979:29: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. logIt->second._msgpos = vsnprintf(logIt->second._msgbuf, logStruct::BUFF_SIZE, format, args); data/libcommoncpp2-1.8.1/src/applog.cpp:1006:29: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. logIt->second._msgpos = vsnprintf(logIt->second._msgbuf, logStruct::BUFF_SIZE, format, args); data/libcommoncpp2-1.8.1/src/applog.cpp:1035:29: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. logIt->second._msgpos = vsnprintf(logIt->second._msgbuf, logStruct::BUFF_SIZE, format, args); data/libcommoncpp2-1.8.1/src/applog.cpp:1064:29: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. logIt->second._msgpos = vsnprintf(logIt->second._msgbuf, logStruct::BUFF_SIZE, format, args); data/libcommoncpp2-1.8.1/src/applog.cpp:1093:29: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. logIt->second._msgpos = vsnprintf(logIt->second._msgbuf, logStruct::BUFF_SIZE, format, args); data/libcommoncpp2-1.8.1/src/applog.cpp:1122:29: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. logIt->second._msgpos = vsnprintf(logIt->second._msgbuf, logStruct::BUFF_SIZE, format, args); data/libcommoncpp2-1.8.1/src/assoc.cpp:77:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy((char *)e->id, id); data/libcommoncpp2-1.8.1/src/file.cpp:1552:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if(!access(path, R_OK)) data/libcommoncpp2-1.8.1/src/file.cpp:1577:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if(!access(path, W_OK | R_OK)) data/libcommoncpp2-1.8.1/src/keydata.cpp:401:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(path, sizeof(path), CAPE_REGISTRY_USERSETTINGS "/%s%s/", regprefix, ccp); data/libcommoncpp2-1.8.1/src/keydata.cpp:406:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(path, sizeof(path), CAPE_REGISTRY_APPLICATIONS "/%s%s/", regprefix, ccp); data/libcommoncpp2-1.8.1/src/lockfile.cpp:140:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(_path, name); data/libcommoncpp2-1.8.1/src/lockfile.cpp:148:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(_path, buffer); data/libcommoncpp2-1.8.1/src/lockfile.cpp:159:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(_path, buffer); data/libcommoncpp2-1.8.1/src/process.cpp:405:9: [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((char *)exename, (char **)args); data/libcommoncpp2-1.8.1/src/slog.cpp:93:8: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. if(syslog) data/libcommoncpp2-1.8.1/src/slog.cpp:94:16: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. fclose(syslog); data/libcommoncpp2-1.8.1/src/slog.cpp:114:8: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. if(syslog) data/libcommoncpp2-1.8.1/src/slog.cpp:115:16: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. fclose(syslog); data/libcommoncpp2-1.8.1/src/slog.cpp:191:8: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. if(syslog) data/libcommoncpp2-1.8.1/src/slog.cpp:192:20: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. fclose(syslog); data/libcommoncpp2-1.8.1/src/slog.cpp:194:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, ident); data/libcommoncpp2-1.8.1/src/slog.cpp:221:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(thread->_msgbuf, sizeof(thread->_msgbuf), format, args); data/libcommoncpp2-1.8.1/src/slog.cpp:238:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(thread->_msgbuf, sizeof(thread->_msgbuf), format, args); data/libcommoncpp2-1.8.1/src/slog.cpp:255:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(thread->_msgbuf, sizeof(thread->_msgbuf), format, args); data/libcommoncpp2-1.8.1/src/slog.cpp:272:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(thread->_msgbuf, sizeof(thread->_msgbuf), format, args); data/libcommoncpp2-1.8.1/src/slog.cpp:289:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(thread->_msgbuf, sizeof(thread->_msgbuf), format, args); data/libcommoncpp2-1.8.1/src/slog.cpp:306:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(thread->_msgbuf, sizeof(thread->_msgbuf), format, args); data/libcommoncpp2-1.8.1/src/slog.cpp:323:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(thread->_msgbuf, sizeof(thread->_msgbuf), format, args); data/libcommoncpp2-1.8.1/src/slog.cpp:340:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(thread->_msgbuf, sizeof(thread->_msgbuf), format, args); data/libcommoncpp2-1.8.1/src/slog.cpp:401:16: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. if(syslog) data/libcommoncpp2-1.8.1/src/slog.cpp:402:28: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. fputs(buf, syslog); data/libcommoncpp2-1.8.1/src/socket.cpp:3552:19: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. size_t TCPStream::printf(const char *format, ...) data/libcommoncpp2-1.8.1/src/socket.cpp:3562:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buf, len, format, args); data/libcommoncpp2-1.8.1/src/string.cpp:112:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(ptr, chars, format, args); data/libcommoncpp2-1.8.1/src/string.cpp:357:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(ptr, chars, format, args); data/libcommoncpp2-1.8.1/src/string.cpp:376:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(ptr, chars, format, args); data/libcommoncpp2-1.8.1/src/string.cpp:1012:11: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. rtn = vsnprintf(ptr, size, format, args); data/libcommoncpp2-1.8.1/src/unix.cpp:97:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, pathname); data/libcommoncpp2-1.8.1/tests/url1.cpp:80:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(status,"%s %d",s,l1); data/libcommoncpp2-1.8.1/w32/cc++/config.h:194:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf _snprintf data/libcommoncpp2-1.8.1/w32/cc++/config.h:194:37: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf _snprintf data/libcommoncpp2-1.8.1/w32/cc++/config.h:222:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/libcommoncpp2-1.8.1/w32/cc++/config.h:222:21: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/libcommoncpp2-1.8.1/w32/cc++/config.h:225:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define vsnprintf _vsnprintf data/libcommoncpp2-1.8.1/src/cmdoptns.cpp:411:25: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long( data/libcommoncpp2-1.8.1/src/dso.cpp:137:14: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. hImage = LoadLibrary(filename); data/libcommoncpp2-1.8.1/src/file.cpp:1736:9: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(!realpath(path, temp)) data/libcommoncpp2-1.8.1/src/getopt.c:215:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. #ifndef getenv data/libcommoncpp2-1.8.1/src/getopt.c:216:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. extern char *getenv (); data/libcommoncpp2-1.8.1/src/getopt.c:401:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. posixly_correct = getenv ("POSIXLY_CORRECT"); data/libcommoncpp2-1.8.1/src/getopt.c:976:1: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt (argc, argv, optstring) data/libcommoncpp2-1.8.1/src/getopt.c:1006:11: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt (argc, argv, "abc:d:0123456789"); data/libcommoncpp2-1.8.1/src/getopt.h:144:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (int __argc, char *const *__argv, const char *__shortopts); data/libcommoncpp2-1.8.1/src/getopt.h:148:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, data/libcommoncpp2-1.8.1/src/getopt.h:161:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (); data/libcommoncpp2-1.8.1/src/getopt.h:163:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt_long (); data/libcommoncpp2-1.8.1/src/getopt1.c:67:1: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt_long (argc, argv, options, long_options, opt_index) data/libcommoncpp2-1.8.1/src/getopt1.c:123:11: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long (argc, argv, "abc:d:0123456789", data/libcommoncpp2-1.8.1/src/keydata.cpp:63: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. configdir = getenv("SystemRoot"); data/libcommoncpp2-1.8.1/src/keydata.cpp:65:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. configdir = getenv("windir"); data/libcommoncpp2-1.8.1/src/keydata.cpp:391:23: [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 *regprefix = getenv("CONFIG_REGISTRY"); data/libcommoncpp2-1.8.1/src/keydata.cpp:456:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. prefix = getenv("USERPROFILE"); data/libcommoncpp2-1.8.1/src/keydata.cpp:471:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. prefix = getenv("HOME"); data/libcommoncpp2-1.8.1/src/mutex.cpp:310:5: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&_criticalSection); data/libcommoncpp2-1.8.1/src/mutex.cpp:333:7: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. ::EnterCriticalSection(&_criticalSection); data/libcommoncpp2-1.8.1/src/process.cpp:641:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if(getenv(strbuf)) data/libcommoncpp2-1.8.1/src/process.cpp:650:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. return ::getenv(name); data/libcommoncpp2-1.8.1/demo/SampleSocketPort.cpp:341:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cmd[255]; data/libcommoncpp2-1.8.1/demo/buffer.cpp:128:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[32]; data/libcommoncpp2-1.8.1/demo/cmdlineopt.cpp:219:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return ::open( values[ numValue - 1 ], O_RDONLY ); data/libcommoncpp2-1.8.1/demo/crc32.cpp:50:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 test[44]; data/libcommoncpp2-1.8.1/demo/crc32.cpp:52:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buf[4]; data/libcommoncpp2-1.8.1/demo/dccpclient.cpp:96:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[200]; data/libcommoncpp2-1.8.1/demo/dccpserver.cpp:94:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[200]; data/libcommoncpp2-1.8.1/demo/dir.cpp:54:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/libcommoncpp2-1.8.1/demo/keydump.cpp:53:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *idx[512]; data/libcommoncpp2-1.8.1/demo/tcpservice.cpp:203:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[ size_o_buf ]; data/libcommoncpp2-1.8.1/demo/test_alog.cpp:111: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 buff[10] ; data/libcommoncpp2-1.8.1/demo/urlfetch.cpp:61:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cbuf[1024]; data/libcommoncpp2-1.8.1/inc/cc++/applog.h:318:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void open(const char *ident); data/libcommoncpp2-1.8.1/inc/cc++/applog.h:398:7: [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). open(ident.c_str()); data/libcommoncpp2-1.8.1/inc/cc++/applog.h:435:7: [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). open(ident.c_str()); data/libcommoncpp2-1.8.1/inc/cc++/buffer.h:270: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 data[1]; data/libcommoncpp2-1.8.1/inc/cc++/digest.h:241:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buf[64]; data/libcommoncpp2-1.8.1/inc/cc++/digest.h:243:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 md5[16]; data/libcommoncpp2-1.8.1/inc/cc++/file.h:262:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char save_space[sizeof(struct dirent) + PATH_MAX + 1]; data/libcommoncpp2-1.8.1/inc/cc++/file.h:279:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void open(const char *name); data/libcommoncpp2-1.8.1/inc/cc++/file.h:315:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX + 1]; data/libcommoncpp2-1.8.1/inc/cc++/file.h:355:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void open(const char *prefix); data/libcommoncpp2-1.8.1/inc/cc++/file.h:568:11: [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). Error open(const char *path); data/libcommoncpp2-1.8.1/inc/cc++/file.h:649:11: [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). Error open(const char *path); data/libcommoncpp2-1.8.1/inc/cc++/file.h:679:17: [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). {return open(pathname);}; data/libcommoncpp2-1.8.1/inc/cc++/file.h:751:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mapname[64]; data/libcommoncpp2-1.8.1/inc/cc++/mime.h:73:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char boundry[8]; data/libcommoncpp2-1.8.1/inc/cc++/mime.h:74:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mtype[80]; data/libcommoncpp2-1.8.1/inc/cc++/mime.h:75:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *header[16]; data/libcommoncpp2-1.8.1/inc/cc++/misc.h: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 data[1]; data/libcommoncpp2-1.8.1/inc/cc++/misc.h:361: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 val[1]; data/libcommoncpp2-1.8.1/inc/cc++/misc.h:369: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 sym[1]; data/libcommoncpp2-1.8.1/inc/cc++/misc.h:383:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char lastpath[KEYDATA_PATH_SIZE + 1]; data/libcommoncpp2-1.8.1/inc/cc++/serial.h:169:17: [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). void open(const char *fname); data/libcommoncpp2-1.8.1/inc/cc++/serial.h:564:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void open(const char *name); data/libcommoncpp2-1.8.1/inc/cc++/slog.h:173:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void open(const char *ident, Class grp = classUser); data/libcommoncpp2-1.8.1/inc/cc++/string.h:108:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char text[(sizeof(char *) + (sizeof(size_t) * 2) + 1)]; data/libcommoncpp2-1.8.1/inc/cc++/thread.h:1161:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char _name[32]; data/libcommoncpp2-1.8.1/inc/cc++/unix.h:304:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void open(const char *pathname, int buffer = 512) data/libcommoncpp2-1.8.1/inc/cc++/unix.h:313:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void open(UnixSocket &unixsock, int buffer = 512); data/libcommoncpp2-1.8.1/inc/cc++/xml.h:78:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dbuf[8192]; data/libcommoncpp2-1.8.1/inc/cc++/xml.h:99:18: [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). virtual bool open(const char *resource); data/libcommoncpp2-1.8.1/inc/cc++/zstream.h:106:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void open(const char *name, size_t size = 512); data/libcommoncpp2-1.8.1/inc/cc++/zstream.h:137:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void open(const char *name, int level = Z_DEFAULT_COMPRESSION, size_t size = 512); data/libcommoncpp2-1.8.1/src/applog.cpp:82:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char _msgbuf[BUFF_SIZE]; data/libcommoncpp2-1.8.1/src/applog.cpp:297: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). _logfs.open(_nomeFile.c_str(), std::ofstream::out | std::ofstream::app | std::ofstream::ate); data/libcommoncpp2-1.8.1/src/applog.cpp:307: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). _logfs.open(_nomeFile.c_str(), std::fstream::in | std::fstream::out); data/libcommoncpp2-1.8.1/src/applog.cpp:342: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). _logfs.open(_nomeFile.c_str(), std::ofstream::out | std::ofstream::app | std::ofstream::ate); data/libcommoncpp2-1.8.1/src/applog.cpp:352: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). _logfs.open(_nomeFile.c_str(), std::fstream::in | std::fstream::out); data/libcommoncpp2-1.8.1/src/applog.cpp:448:17: [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). d->_logfs.open(d->_nomeFile.c_str(), std::fstream::in | std::fstream::out); data/libcommoncpp2-1.8.1/src/applog.cpp:452:19: [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). d->_logfs.open(d->_nomeFile.c_str(), std::fstream::out | std::fstream::app); data/libcommoncpp2-1.8.1/src/applog.cpp:466:19: [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). d->_logfs.open(d->_nomeFile.c_str(), std::fstream::in | std::fstream::out); data/libcommoncpp2-1.8.1/src/applog.cpp:562:17: [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). d->_logfs.open(d->_nomeFile.c_str(), std::fstream::out | std::fstream::app); data/libcommoncpp2-1.8.1/src/applog.cpp:572:19: [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). d->_logfs.open(d->_nomeFile.c_str(), std::fstream::in | std::fstream::out); data/libcommoncpp2-1.8.1/src/applog.cpp:613: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 buf[50]; data/libcommoncpp2-1.8.1/src/applog.cpp:732: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). void AppLog::open(const char *ident) data/libcommoncpp2-1.8.1/src/applog.cpp:753:19: [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). d->_logfs.open(d->_nomeFile.c_str(), std::fstream::out | std::fstream::app); data/libcommoncpp2-1.8.1/src/applog.cpp:1177:5: [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). open(ident); data/libcommoncpp2-1.8.1/src/buffer.cpp:203:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data, head, objsize); data/libcommoncpp2-1.8.1/src/buffer.cpp:211:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tail, data, objsize); data/libcommoncpp2-1.8.1/src/buffer.cpp:219:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data, head, objsize); data/libcommoncpp2-1.8.1/src/buffer.cpp:305:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data->data, dp, len); data/libcommoncpp2-1.8.1/src/cidr.cpp:145:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&bcast, &network, sizeof(network)); data/libcommoncpp2-1.8.1/src/cidr.cpp:155:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 dots[4]; data/libcommoncpp2-1.8.1/src/cidr.cpp:164: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). return atoi(mp); data/libcommoncpp2-1.8.1/src/cidr.cpp:171: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). dots[0] = atoi(cp); data/libcommoncpp2-1.8.1/src/cidr.cpp:174:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). dots[++dcount] = atoi(gp); data/libcommoncpp2-1.8.1/src/cidr.cpp:191:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cbuf[INET_IPV4_ADDRESS_SIZE]; data/libcommoncpp2-1.8.1/src/cidr.cpp:277:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&bcast, &network, sizeof(network)); data/libcommoncpp2-1.8.1/src/cidr.cpp:289: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). return atoi(++sp); data/libcommoncpp2-1.8.1/src/cidr.cpp:325:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cbuf[INET_IPV6_ADDRESS_SIZE]; data/libcommoncpp2-1.8.1/src/date.cpp:208:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[11]; data/libcommoncpp2-1.8.1/src/date.cpp:230:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[11]; data/libcommoncpp2-1.8.1/src/date.cpp:238:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[11]; data/libcommoncpp2-1.8.1/src/date.cpp:246:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[11]; data/libcommoncpp2-1.8.1/src/date.cpp:259:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[11]; data/libcommoncpp2-1.8.1/src/date.cpp:269:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[11]; data/libcommoncpp2-1.8.1/src/date.cpp:271:12: [2] (integer) atol: 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). return atol(buf) * 10000 + atol(buf + 5) * 100 + atol(buf + 8); data/libcommoncpp2-1.8.1/src/date.cpp:271:32: [2] (integer) atol: 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). return atol(buf) * 10000 + atol(buf + 5) * 100 + atol(buf + 8); data/libcommoncpp2-1.8.1/src/date.cpp:271:54: [2] (integer) atol: 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). return atol(buf) * 10000 + atol(buf + 5) * 100 + atol(buf + 8); data/libcommoncpp2-1.8.1/src/date.cpp:476:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[7]; data/libcommoncpp2-1.8.1/src/date.cpp:484:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[7]; data/libcommoncpp2-1.8.1/src/date.cpp:492:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[7]; data/libcommoncpp2-1.8.1/src/date.cpp:539:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[7]; data/libcommoncpp2-1.8.1/src/date.cpp:787:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[11]; data/libcommoncpp2-1.8.1/src/date.cpp:912:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[64]; data/libcommoncpp2-1.8.1/src/digest.cpp:101:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[3]; data/libcommoncpp2-1.8.1/src/digest.cpp:103:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%02x", csum); data/libcommoncpp2-1.8.1/src/digest.cpp:137:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ( buffer, &crc16, sizeof(crc16) ); data/libcommoncpp2-1.8.1/src/digest.cpp:205:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, &crc32, sizeof(crc32)); data/libcommoncpp2-1.8.1/src/dir.cpp:66:9: [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). open(fname); data/libcommoncpp2-1.8.1/src/dir.cpp:138:11: [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). void Dir::open(const char *fname) data/libcommoncpp2-1.8.1/src/dir.cpp:174:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&data, &fdata, sizeof(fdata)); data/libcommoncpp2-1.8.1/src/dir.cpp:288:5: [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). open(prefix); data/libcommoncpp2-1.8.1/src/dir.cpp:298: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). void DirTree::open(const char *prefix) data/libcommoncpp2-1.8.1/src/dir.cpp:316:20: [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). dir[current++].open(prefix); data/libcommoncpp2-1.8.1/src/dir.cpp:333:5: [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). open(prefix); data/libcommoncpp2-1.8.1/src/dir.cpp:402:32: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). dir[current++].open(path); data/libcommoncpp2-1.8.1/src/engine.cpp:167:17: [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 ( myZStream.next_in + myZStream.avail_in, data + written, toAdd ); data/libcommoncpp2-1.8.1/src/engine.cpp:210:17: [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 ( data + read, myLastUncompressedDataRead, toRead ); data/libcommoncpp2-1.8.1/src/file.cpp:373:5: [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). open(path); data/libcommoncpp2-1.8.1/src/file.cpp:389:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return open(pathname); data/libcommoncpp2-1.8.1/src/file.cpp:392:31: [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). ThreadFile::Error ThreadFile::open(const char *path) data/libcommoncpp2-1.8.1/src/file.cpp:420:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = ::open(pathname, O_RDWR); data/libcommoncpp2-1.8.1/src/file.cpp:423: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). fd = ::open(pathname, O_CREAT | O_RDWR | O_TRUNC, data/libcommoncpp2-1.8.1/src/file.cpp:682:5: [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). open(path); data/libcommoncpp2-1.8.1/src/file.cpp:695:31: [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). SharedFile::Error SharedFile::open(const char *path) data/libcommoncpp2-1.8.1/src/file.cpp:724:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = ::open(pathname, O_RDWR); data/libcommoncpp2-1.8.1/src/file.cpp:727: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). fd = ::open(pathname, O_CREAT | O_RDWR | O_TRUNC, data/libcommoncpp2-1.8.1/src/file.cpp:1232:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(fname, (int)mode); data/libcommoncpp2-1.8.1/src/file.cpp:1234: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). fd = ::open(pathname, O_CREAT | O_RDWR | O_TRUNC, data/libcommoncpp2-1.8.1/src/file.cpp:1257:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(fname, (int)mode | O_CREAT, 0660); data/libcommoncpp2-1.8.1/src/file.cpp:1291:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(fname, (int)mode); data/libcommoncpp2-1.8.1/src/file.cpp:1734:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp[PATH_MAX]; data/libcommoncpp2-1.8.1/src/file.cpp:1770:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char left[PATH_MAX]; data/libcommoncpp2-1.8.1/src/file.cpp:1772:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char left[size]; data/libcommoncpp2-1.8.1/src/file.cpp:1809: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 next_token[PATH_MAX]; data/libcommoncpp2-1.8.1/src/file.cpp:1811: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 next_token[size]; data/libcommoncpp2-1.8.1/src/file.cpp:1870:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 symlink[size]; data/libcommoncpp2-1.8.1/src/in6addr.cpp:72:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ipaddr, &in6addr_any, sizeof(in6_addr)); data/libcommoncpp2-1.8.1/src/in6addr.cpp:93:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ipaddr, &addr, sizeof(struct in6_addr)); data/libcommoncpp2-1.8.1/src/in6addr.cpp:99:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ipaddr, rhs.ipaddr, sizeof(struct in6_addr) * addr_count); data/libcommoncpp2-1.8.1/src/in6addr.cpp:168:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ipaddr, rhs.ipaddr, sizeof(struct in6_addr) * addr_count); data/libcommoncpp2-1.8.1/src/in6addr.cpp:231:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[256]; data/libcommoncpp2-1.8.1/src/in6addr.cpp:343: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 hbuf[8192]; data/libcommoncpp2-1.8.1/src/in6addr.cpp:350: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 hbuf[8192]; data/libcommoncpp2-1.8.1/src/in6addr.cpp:412:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char strbuf[64]; data/libcommoncpp2-1.8.1/src/in6addr.cpp:422:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hbuf[8192]; data/libcommoncpp2-1.8.1/src/in6addr.cpp:428:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hbuf[8192]; data/libcommoncpp2-1.8.1/src/inaddr.cpp:98:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ipaddr, rhs.ipaddr, sizeof(struct in_addr) * addr_count); data/libcommoncpp2-1.8.1/src/inaddr.cpp:174:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ipaddr, &aptr.in4, sizeof(struct in_addr)); data/libcommoncpp2-1.8.1/src/inaddr.cpp:189:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ipaddr, rhs.ipaddr, sizeof(struct in_addr) * addr_count); data/libcommoncpp2-1.8.1/src/inaddr.cpp:252:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[256]; data/libcommoncpp2-1.8.1/src/inaddr.cpp:313: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 hbuf[8192]; data/libcommoncpp2-1.8.1/src/inaddr.cpp:320: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 hbuf[8192]; data/libcommoncpp2-1.8.1/src/inaddr.cpp:370: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 l = 32 - atoi(mask); data/libcommoncpp2-1.8.1/src/inaddr.cpp:405:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hbuf[8192]; data/libcommoncpp2-1.8.1/src/inaddr.cpp:411:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hbuf[8192]; data/libcommoncpp2-1.8.1/src/keydata.cpp:205:12: [2] (integer) atol: 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). return atol(cp); data/libcommoncpp2-1.8.1/src/keydata.cpp:369:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[KEYDATA_PATH_SIZE]; data/libcommoncpp2-1.8.1/src/keydata.cpp:370:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char seek[33]; data/libcommoncpp2-1.8.1/src/keydata.cpp:388:5: [2] (buffer) TCHAR: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. TCHAR keyname[256]; data/libcommoncpp2-1.8.1/src/keydata.cpp:389:5: [2] (buffer) TCHAR: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. TCHAR keytext[256]; data/libcommoncpp2-1.8.1/src/keydata.cpp:571:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char seek[33]; data/libcommoncpp2-1.8.1/src/keydata.cpp:572:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char find[33]; data/libcommoncpp2-1.8.1/src/keydata.cpp:573:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[256]; data/libcommoncpp2-1.8.1/src/keydata.cpp:574:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[256]; data/libcommoncpp2-1.8.1/src/keydata.cpp:586:22: [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). cfgFile->open(path, ios::in); data/libcommoncpp2-1.8.1/src/lockfile.cpp:71:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mname[65]; data/libcommoncpp2-1.8.1/src/lockfile.cpp:127:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[128]; data/libcommoncpp2-1.8.1/src/lockfile.cpp:163: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). fd = ::open(_path, O_WRONLY | O_CREAT | O_EXCL, 0660); data/libcommoncpp2-1.8.1/src/lockfile.cpp:177: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). fd = ::open(_path, O_RDONLY); data/libcommoncpp2-1.8.1/src/lockfile.cpp:193: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). pid = atoi(buffer); data/libcommoncpp2-1.8.1/src/md5.cpp:262:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 cbuf[8]; data/libcommoncpp2-1.8.1/src/md5.cpp:265:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 unsigned char pad[64]={ data/libcommoncpp2-1.8.1/src/md5.cpp:305:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, md5, 16); data/libcommoncpp2-1.8.1/src/md5.cpp:324:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dbuf[36]; data/libcommoncpp2-1.8.1/src/md5.cpp:330:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(dbuf + 2 * i, "%02x", md5[i]); data/libcommoncpp2-1.8.1/src/mempager.cpp:260:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(frame->data, object, len); data/libcommoncpp2-1.8.1/src/nat.cpp:212:23: [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). if( ( natfd = open( NAT_DEVICE, O_RDONLY, 0 ) ) < 0 ) data/libcommoncpp2-1.8.1/src/nat.cpp:273:23: [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). if( ( natfd = open( NAT_DEVICE, O_RDWR ) ) < 0 ) data/libcommoncpp2-1.8.1/src/nat.cpp:323:23: [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). if( ( natfd = open( NAT_DEVICE, O_RDWR ) ) < 0 ) data/libcommoncpp2-1.8.1/src/nat.cpp:366:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. return (char *)natmsg[ ( res >= natOK && res <= natIFaceErr ) ? res : natUnkownErr ]; data/libcommoncpp2-1.8.1/src/network.cpp:93:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[8192]; data/libcommoncpp2-1.8.1/src/network.cpp:163:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char outbuff[8192]; data/libcommoncpp2-1.8.1/src/peer.cpp:111: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(&peer.ipv6.sin6_addr, &in6addr_loopback, data/libcommoncpp2-1.8.1/src/peer.cpp:196: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(&peer.ipv6.sin6_addr, &in6addr_loopback, sizeof(in6addr_loopback)); data/libcommoncpp2-1.8.1/src/private.h:55:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char _msgbuf[128]; data/libcommoncpp2-1.8.1/src/process.cpp:106:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char userid[65]; data/libcommoncpp2-1.8.1/src/process.cpp:239:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/libcommoncpp2-1.8.1/src/process.cpp:307:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/libcommoncpp2-1.8.1/src/process.cpp:332:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[2048]; data/libcommoncpp2-1.8.1/src/process.cpp:400:11: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. pid = vfork(); data/libcommoncpp2-1.8.1/src/process.cpp:498: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). if((fd = open(_PATH_TTY, O_RDWR)) >= 0) { data/libcommoncpp2-1.8.1/src/process.cpp:521:11: [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). ::open(dev, O_RDWR); data/libcommoncpp2-1.8.1/src/process.cpp:522:11: [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). ::open(dev, O_RDWR); data/libcommoncpp2-1.8.1/src/process.cpp:523:11: [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). ::open(dev, O_RDWR); data/libcommoncpp2-1.8.1/src/process.cpp:637:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char strbuf[256]; data/libcommoncpp2-1.8.1/src/serial.cpp:131:5: [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). open(fname); data/libcommoncpp2-1.8.1/src/serial.cpp:250:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(current, original, sizeof(DCB)); data/libcommoncpp2-1.8.1/src/serial.cpp:253:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(current, original, sizeof(struct termios)); data/libcommoncpp2-1.8.1/src/serial.cpp:418: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(current, ser.current, sizeof(DCB)); data/libcommoncpp2-1.8.1/src/serial.cpp:419: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(original, ser.original, sizeof(DCB)); data/libcommoncpp2-1.8.1/src/serial.cpp:424:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(current, ser.current, sizeof(struct termios)); data/libcommoncpp2-1.8.1/src/serial.cpp:425:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(original, ser.original, sizeof(struct termios)); data/libcommoncpp2-1.8.1/src/serial.cpp:431: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). void Serial::open(const char * fname) data/libcommoncpp2-1.8.1/src/serial.cpp:436:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). dev = ::open(fname, cflags); data/libcommoncpp2-1.8.1/src/serial.cpp:1311:5: [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). open(name); data/libcommoncpp2-1.8.1/src/serial.cpp:1328:17: [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). void ttystream::open(const char *name) data/libcommoncpp2-1.8.1/src/serial.cpp:1332:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pathname[256]; data/libcommoncpp2-1.8.1/src/serial.cpp:1351:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(pathname, "/dev/"); data/libcommoncpp2-1.8.1/src/serial.cpp:1367:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). Serial::open(pathname); data/libcommoncpp2-1.8.1/src/serial.cpp:1420:19: [2] (integer) atol: 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). opt = atol(cp); data/libcommoncpp2-1.8.1/src/slog.cpp:121:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void Slog::open(const char *ident, Class grp) data/libcommoncpp2-1.8.1/src/slog.cpp:199:13: [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(buf, ".log"); data/libcommoncpp2-1.8.1/src/slog.cpp:201:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). syslog = fopen(cp, "a"); data/libcommoncpp2-1.8.1/src/slog.cpp:367:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/libcommoncpp2-1.8.1/src/slog.cpp:434:5: [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). open(ident, grp); data/libcommoncpp2-1.8.1/src/socket.cpp:1240:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[128], *cp; data/libcommoncpp2-1.8.1/src/socket.cpp:1313:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[128], *cp; data/libcommoncpp2-1.8.1/src/socket.cpp:1336: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). port = atoi(cp); data/libcommoncpp2-1.8.1/src/socket.cpp:1563:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&group.imr_address, &myaddr.sin_addr, sizeof(&myaddr.sin_addr)); data/libcommoncpp2-1.8.1/src/socket.cpp:1703:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[128], *cp; data/libcommoncpp2-1.8.1/src/socket.cpp:1740:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[128], *cp; data/libcommoncpp2-1.8.1/src/socket.cpp:1753: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). port = atoi(cp); data/libcommoncpp2-1.8.1/src/socket.cpp:1893:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[128], *cp; data/libcommoncpp2-1.8.1/src/socket.cpp:1956:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[128], *cp; data/libcommoncpp2-1.8.1/src/socket.cpp:1977:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). addr.sin_port = htons(atoi(cp)); data/libcommoncpp2-1.8.1/src/socket.cpp:2075:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[128], *cp; data/libcommoncpp2-1.8.1/src/socket.cpp:2138:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[128], *cp; data/libcommoncpp2-1.8.1/src/socket.cpp:2157:32: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). addr.sin6_port = htons(atoi(cp)); data/libcommoncpp2-1.8.1/src/socket.cpp:2299:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[128], *cp; data/libcommoncpp2-1.8.1/src/socket.cpp:2361:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[128], *cp; data/libcommoncpp2-1.8.1/src/socket.cpp:2389:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). addr.sin_port = htons(atoi(cp)); data/libcommoncpp2-1.8.1/src/socket.cpp:2553:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[128]; data/libcommoncpp2-1.8.1/src/socket.cpp:2603:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[128]; data/libcommoncpp2-1.8.1/src/socket.cpp:2622: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). port = atoi(cp); data/libcommoncpp2-1.8.1/src/socket.cpp:2741:13: [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(&addr.sin6_addr, &in6addr_loopback, sizeof(in6addr_loopback)); data/libcommoncpp2-1.8.1/src/socket.cpp:2986:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[128]; data/libcommoncpp2-1.8.1/src/socket.cpp:3047:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[128]; data/libcommoncpp2-1.8.1/src/socket.cpp:3067: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). port = atoi(cp); data/libcommoncpp2-1.8.1/src/socket.cpp:3201:13: [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(&addr.sin6_addr, &in6addr_loopback, sizeof(in6addr_loopback)); data/libcommoncpp2-1.8.1/src/socket.cpp:3691:13: [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(&addr.sin6_addr, &in6addr_loopback, sizeof(in6addr_loopback)); data/libcommoncpp2-1.8.1/src/socketport.cpp:394: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(&addr.sin6_addr, &in6addr_loopback, sizeof(in6addr_loopback)); data/libcommoncpp2-1.8.1/src/strchar.cpp:249:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dest, src, len); data/libcommoncpp2-1.8.1/src/thread.cpp:1703:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ret, &temp, sizeof(time_t)); data/libcommoncpp2-1.8.1/src/thread.cpp:1705: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(tloc, &ret, sizeof(time_t)); data/libcommoncpp2-1.8.1/src/thread.cpp:1724:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tp, &temp, sizeof(struct timeval)); data/libcommoncpp2-1.8.1/src/thread.cpp:1728: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(tp, &temp, sizeof(struct timeval)); data/libcommoncpp2-1.8.1/src/thread.cpp:1743:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(result, temp, sizeof(struct tm)); data/libcommoncpp2-1.8.1/src/thread.cpp:1756:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(result, temp, sizeof(struct tm)); data/libcommoncpp2-1.8.1/src/unix.cpp:81:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( addr.sun_path, pathname, slen ); data/libcommoncpp2-1.8.1/src/unix.cpp:176:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( addr.sun_path, pathname, slen ); data/libcommoncpp2-1.8.1/src/unix.cpp:399: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(pptr(), pptr() + rlen, req); data/libcommoncpp2-1.8.1/src/unix.cpp:419:5: [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). open(pathname, buf); data/libcommoncpp2-1.8.1/src/unix.cpp:426:5: [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). open(server, buf); data/libcommoncpp2-1.8.1/src/unix.cpp:434:18: [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). void unixstream::open(UnixSocket &unixsock, int buf) data/libcommoncpp2-1.8.1/src/unix.cpp:471:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( addr.sun_path, pathname, slen ); data/libcommoncpp2-1.8.1/src/url.cpp:364: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). so = ::open(path, O_RDWR); data/libcommoncpp2-1.8.1/src/url.cpp:366:20: [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). so = ::open(path, O_RDONLY); data/libcommoncpp2-1.8.1/src/url.cpp:398:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[512]; data/libcommoncpp2-1.8.1/src/url.cpp:455:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char reloc[4096]; data/libcommoncpp2-1.8.1/src/url.cpp:457:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char host[140]; data/libcommoncpp2-1.8.1/src/url.cpp:462:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[4096]; data/libcommoncpp2-1.8.1/src/url.cpp:502: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). port = atoi(ep); data/libcommoncpp2-1.8.1/src/url.cpp:763:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[4096]; data/libcommoncpp2-1.8.1/src/url.cpp:779:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). switch(atoi(ref)) { data/libcommoncpp2-1.8.1/src/urlstring.cpp:68:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 const unsigned char alphabet[65] = data/libcommoncpp2-1.8.1/src/urlstring.cpp:128:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char decoder[256]; data/libcommoncpp2-1.8.1/src/urlstring.cpp:173:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hex[3]; data/libcommoncpp2-1.8.1/src/urlstring.cpp:256:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[limit]; data/libcommoncpp2-1.8.1/src/urlstring.cpp:274:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 buffer[limit+1]; data/libcommoncpp2-1.8.1/src/urlstring.cpp:291:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[limit]; data/libcommoncpp2-1.8.1/src/xml.cpp:112:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const unsigned char *attrib[128]; data/libcommoncpp2-1.8.1/src/xml.cpp:257:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). cp = atoi(dbuf + 1); data/libcommoncpp2-1.8.1/src/xml.cpp:347:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/libcommoncpp2-1.8.1/src/xml.cpp:351:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(!open(resource)) data/libcommoncpp2-1.8.1/src/xml.cpp:651:17: [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). bool XMLStream::open(const char *resource) data/libcommoncpp2-1.8.1/src/zstream.cpp:112: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). void IZStream::open(const char *name, size_t size) data/libcommoncpp2-1.8.1/src/zstream.cpp:234:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mode[4]; data/libcommoncpp2-1.8.1/src/zstream.cpp:240:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(mode, "wb\0"); data/libcommoncpp2-1.8.1/src/zstream.cpp:278: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). void OZStream::open(const char *name, int level, size_t size) data/libcommoncpp2-1.8.1/src/zstream.cpp:280:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mode[4]; data/libcommoncpp2-1.8.1/src/zstream.cpp:285:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(mode, "wb\0"); data/libcommoncpp2-1.8.1/tests/Test_Date.h:95: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). exp_value = atoi(tmp2.str().c_str()); data/libcommoncpp2-1.8.1/tests/Test_Date.h:121:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char aDate[9]; data/libcommoncpp2-1.8.1/tests/Test_Date.h:122:2: [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(aDate, "20031306"); // 13th month data/libcommoncpp2-1.8.1/tests/Test_Date.h:129:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dateBuffer[1000]; data/libcommoncpp2-1.8.1/tests/Test_Digest.h:61: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 binaryData1[BINARY_DATA1_SIZE]; data/libcommoncpp2-1.8.1/tests/Test_Engine.cpp:85:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[50]; data/libcommoncpp2-1.8.1/tests/Test_Engine.cpp:86:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "test %d", l+1); data/libcommoncpp2-1.8.1/tests/Test_URLString.h:74: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 actualEncodedChars[1000]; // should be enough for the tests data/libcommoncpp2-1.8.1/tests/Test_URLString.h:75: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 actualDecodedChars[1000]; // should be enough for the tests data/libcommoncpp2-1.8.1/tests/Test_URLString.h:90:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char binaryData[256]; data/libcommoncpp2-1.8.1/tests/Test_URLString.h:91:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char encodedBinaryData[sizeof(binaryData)*4]; data/libcommoncpp2-1.8.1/tests/Test_URLString.h:92:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char decodedBinaryData[sizeof(binaryData)]; data/libcommoncpp2-1.8.1/tests/Test_URLString.h:117:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char expectedOutputChars[1000] = "YDEyMzQ1Njc4OTAtPVxRV0VSVFlVSU9QW11BU0RGR0hKS0w7J1pYQ1ZCTk0sLi9+IUAjJCVeJiooKV8rfHF3ZXJ0eXVpb3B7fWFzZGZnaGprbDoienhjdmJubTw+Pw=="; data/libcommoncpp2-1.8.1/tests/Test_URLString.h:128:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char expectedOutputChars[1000] = "VGhpcyBpcyBhIHRlc3Qu"; data/libcommoncpp2-1.8.1/tests/Test_URLString.h:177:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char expectedOutputChars[1000] = data/libcommoncpp2-1.8.1/tests/tcpstr1.cpp:25:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[200]; data/libcommoncpp2-1.8.1/tests/url1.cpp:11: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 buf1[BUFLEN]; data/libcommoncpp2-1.8.1/tests/url1.cpp:12: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 buf2[BUFLEN]; data/libcommoncpp2-1.8.1/tests/url1.cpp:15: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 status[256] = ""; data/libcommoncpp2-1.8.1/demo/SampleSocketPort.cpp:228:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nLen = (ssize_t)strlen(szTxData); data/libcommoncpp2-1.8.1/demo/SampleSocketPort.cpp:292:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t nLen = strlen(pszData); data/libcommoncpp2-1.8.1/demo/cmdlineopt.cpp:337:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int i = ::strlen( argv[ 0 ] ); data/libcommoncpp2-1.8.1/demo/dccpclient.cpp:69:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return this-> writeData(buf,strlen(buf)); data/libcommoncpp2-1.8.1/demo/dccpserver.cpp:79:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return this-> writeData(buf,strlen(buf)); data/libcommoncpp2-1.8.1/demo/urlfetch.cpp:80:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). url.read(cbuf, sizeof(cbuf)); data/libcommoncpp2-1.8.1/demo/xmlfetch.cpp:58:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read(unsigned char *buffer, size_t len) { data/libcommoncpp2-1.8.1/demo/xmlfetch.cpp:59:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). URLStream::read((char *)buffer, len); data/libcommoncpp2-1.8.1/inc/cc++/persist.h:238:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual bool read(Engine& archive); data/libcommoncpp2-1.8.1/inc/cc++/persist.h:327:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(BaseObject &object) THROWS (PersistException); data/libcommoncpp2-1.8.1/inc/cc++/persist.h:332:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(BaseObject *&object) THROWS (PersistException); data/libcommoncpp2-1.8.1/inc/cc++/persist.h:337:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(int8& i) THROWS (PersistException) { CCXX_ENGINEREAD_REF(i); } data/libcommoncpp2-1.8.1/inc/cc++/persist.h:338:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(uint8& i) THROWS (PersistException) { CCXX_ENGINEREAD_REF(i); } data/libcommoncpp2-1.8.1/inc/cc++/persist.h:339:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(int16& i) THROWS (PersistException) { CCXX_ENGINEREAD_REF(i); } data/libcommoncpp2-1.8.1/inc/cc++/persist.h:340:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(uint16& i) THROWS (PersistException) { CCXX_ENGINEREAD_REF(i); } data/libcommoncpp2-1.8.1/inc/cc++/persist.h:341:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(int32& i) THROWS (PersistException) { CCXX_ENGINEREAD_REF(i); } data/libcommoncpp2-1.8.1/inc/cc++/persist.h:342:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(uint32& i) THROWS (PersistException) { CCXX_ENGINEREAD_REF(i); } data/libcommoncpp2-1.8.1/inc/cc++/persist.h:344:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(int64& i) THROWS (PersistException) { CCXX_ENGINEREAD_REF(i); } data/libcommoncpp2-1.8.1/inc/cc++/persist.h:345:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(uint64& i) THROWS (PersistException) { CCXX_ENGINEREAD_REF(i); } data/libcommoncpp2-1.8.1/inc/cc++/persist.h:347:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(float& i) THROWS (PersistException) { CCXX_ENGINEREAD_REF(i); } data/libcommoncpp2-1.8.1/inc/cc++/persist.h:348:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(double& i) THROWS (PersistException) { CCXX_ENGINEREAD_REF(i); } data/libcommoncpp2-1.8.1/inc/cc++/persist.h:351:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(String& str) THROWS (PersistException); data/libcommoncpp2-1.8.1/inc/cc++/persist.h:352:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::string& str) THROWS (PersistException); data/libcommoncpp2-1.8.1/inc/cc++/socket.h:2055:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t read(char *bytes, size_t length, timeout_t timeout = 0); data/libcommoncpp2-1.8.1/inc/cc++/string.h:611: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). {return strlen(getText());}; data/libcommoncpp2-1.8.1/inc/cc++/xml.h:130:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual int read(unsigned char *buffer, size_t len) = 0; data/libcommoncpp2-1.8.1/src/assoc.cpp:76: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). e->id = (const char *)getMemory(strlen(id) + 1); data/libcommoncpp2-1.8.1/src/date.cpp:104:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = strlen(str); data/libcommoncpp2-1.8.1/src/date.cpp:507:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = strlen(str); data/libcommoncpp2-1.8.1/src/date.cpp:708:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = strlen(a_str); data/libcommoncpp2-1.8.1/src/date.cpp:711:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str, a_str, size); data/libcommoncpp2-1.8.1/src/dir.cpp:141:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(fname) + 4; data/libcommoncpp2-1.8.1/src/dir.cpp:308:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). prefixpos = (unsigned)strlen(path) - 1; data/libcommoncpp2-1.8.1/src/dir.cpp:385:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(cp + 1, sizeof(path) - strlen(path) - 2, "%s", name); data/libcommoncpp2-1.8.1/src/dir.cpp:404:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(path + strlen(path), sizeof(path) - strlen(path), "/"); data/libcommoncpp2-1.8.1/src/dir.cpp:404:58: [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). snprintf(path + strlen(path), sizeof(path) - strlen(path), "/"); data/libcommoncpp2-1.8.1/src/engine.cpp:200:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). myUnderlyingStream.read((char *)data,size); data/libcommoncpp2-1.8.1/src/engine.cpp:204:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ( read < size ) { data/libcommoncpp2-1.8.1/src/engine.cpp:207:40: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint32 toRead = size - read; data/libcommoncpp2-1.8.1/src/engine.cpp:210:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). memcpy ( data + read, myLastUncompressedDataRead, toRead ); data/libcommoncpp2-1.8.1/src/engine.cpp:227:44: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). myUnderlyingStream.read ( ( char* ) myCompressedDataBuffer, MAX_BUFFER ); data/libcommoncpp2-1.8.1/src/engine.cpp:244:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). myUnderlyingStream.read ( ( char * ) data, size ); data/libcommoncpp2-1.8.1/src/engine.cpp:297:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Engine::read(BaseObject &object) THROWS (PersistException) data/libcommoncpp2-1.8.1/src/engine.cpp:300:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(id); data/libcommoncpp2-1.8.1/src/engine.cpp:321:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Engine::read(BaseObject *&object) THROWS (PersistException) data/libcommoncpp2-1.8.1/src/engine.cpp:324:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(id); data/libcommoncpp2-1.8.1/src/engine.cpp:364:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(majik); data/libcommoncpp2-1.8.1/src/engine.cpp:367:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). object->read(*this); data/libcommoncpp2-1.8.1/src/engine.cpp:368:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(majik); data/libcommoncpp2-1.8.1/src/engine.cpp:380:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(classId); data/libcommoncpp2-1.8.1/src/engine.cpp:387:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(className); data/libcommoncpp2-1.8.1/src/engine.cpp:404:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Engine::read(String& str) THROWS (PersistException) data/libcommoncpp2-1.8.1/src/engine.cpp:407:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(len); data/libcommoncpp2-1.8.1/src/engine.cpp:426:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Engine::read(std::string& str) THROWS (PersistException) data/libcommoncpp2-1.8.1/src/engine.cpp:429:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(len); data/libcommoncpp2-1.8.1/src/engine.cpp:437:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define CCXX_RE(ar,ob) ar.read(ob); return ar data/libcommoncpp2-1.8.1/src/engine.cpp:484:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint32 a; ar.read(a); ob=a==1;return ar; data/libcommoncpp2-1.8.1/src/file.cpp:501:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int io = ::read(fd, fcb->address, fcb->len); data/libcommoncpp2-1.8.1/src/file.cpp:791:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int io = ::read(fd, fcb.address, fcb.len); data/libcommoncpp2-1.8.1/src/file.cpp:1738:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(temp) >= size) data/libcommoncpp2-1.8.1/src/file.cpp:1789: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). left_len = strlen(left); data/libcommoncpp2-1.8.1/src/file.cpp:1796: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). buffer_len = strlen(buffer); data/libcommoncpp2-1.8.1/src/file.cpp:1798: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). left_len = strlen(left); data/libcommoncpp2-1.8.1/src/file.cpp:1852: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). buffer_len = strlen(buffer); data/libcommoncpp2-1.8.1/src/file.cpp:1902: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). left_len = strlen(symlink); data/libcommoncpp2-1.8.1/src/file.cpp:1907:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). left_len = strlen(left); data/libcommoncpp2-1.8.1/src/friends.cpp:135:5: [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(timeout * 1000); data/libcommoncpp2-1.8.1/src/friends.cpp:161:5: [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(timeout * 1000); data/libcommoncpp2-1.8.1/src/getopt.c:238:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # if (!defined __STDC__ || !__STDC__) && !defined strlen data/libcommoncpp2-1.8.1/src/getopt.c:241:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). extern int strlen (const char *); data/libcommoncpp2-1.8.1/src/getopt.c:432:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = nonoption_flags_max_len = strlen (orig_str); data/libcommoncpp2-1.8.1/src/getopt.c:660:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). == (unsigned int) strlen (p->name)) data/libcommoncpp2-1.8.1/src/getopt.c:687:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/libcommoncpp2-1.8.1/src/getopt.c:719: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). nextchar += strlen (nextchar); data/libcommoncpp2-1.8.1/src/getopt.c:735: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). nextchar += strlen (nextchar); data/libcommoncpp2-1.8.1/src/getopt.c:740:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/libcommoncpp2-1.8.1/src/getopt.c:851:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((unsigned int) (nameend - nextchar) == strlen (p->name)) data/libcommoncpp2-1.8.1/src/getopt.c:874:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/libcommoncpp2-1.8.1/src/getopt.c:894: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). nextchar += strlen (nextchar); data/libcommoncpp2-1.8.1/src/getopt.c:908: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). nextchar += strlen (nextchar); data/libcommoncpp2-1.8.1/src/getopt.c:912:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nextchar += strlen (nextchar); data/libcommoncpp2-1.8.1/src/keydata.cpp:128:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(sym) + 1; data/libcommoncpp2-1.8.1/src/keydata.cpp:294:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(data) + 1; data/libcommoncpp2-1.8.1/src/keydata.cpp:516:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cp = path + strlen(path) - 1; data/libcommoncpp2-1.8.1/src/keydata.cpp:664: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). ep = cp + strlen(cp); data/libcommoncpp2-1.8.1/src/lockfile.cpp:139:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _path = new char[strlen(name) + 1]; data/libcommoncpp2-1.8.1/src/lockfile.cpp:147:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _path = new char[strlen(buffer) + 1]; data/libcommoncpp2-1.8.1/src/lockfile.cpp:158:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _path = new char[strlen(buffer) + 1]; data/libcommoncpp2-1.8.1/src/lockfile.cpp:167:36: [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(::write(fd, buffer, strlen(buffer))) data/libcommoncpp2-1.8.1/src/lockfile.cpp:186:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). status = ::read(fd, buffer, sizeof(buffer) - 1); data/libcommoncpp2-1.8.1/src/mempager.cpp:214:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(str) + 1; data/libcommoncpp2-1.8.1/src/mempager.cpp:221:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(str) + 1; data/libcommoncpp2-1.8.1/src/mempager.cpp:266:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return push(string, strlen(string) + 1); data/libcommoncpp2-1.8.1/src/missing.cpp:153:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(str) + 1; data/libcommoncpp2-1.8.1/src/persist.cpp:84:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool BaseObject::read(Engine& archive) data/libcommoncpp2-1.8.1/src/serial.cpp:525:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return ::read(dev, Data, Length); data/libcommoncpp2-1.8.1/src/serial.cpp:1345: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). namelen = strlen(name); data/libcommoncpp2-1.8.1/src/serial.cpp:1711:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(1 == ::read(iosync[0], (char *)&buf, 1)) { data/libcommoncpp2-1.8.1/src/simplesocket.cpp:136:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t SimpleTCPStream::read(char *bytes, size_t length, timeout_t timeout) data/libcommoncpp2-1.8.1/src/slog.cpp:193: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). buf = new char[strlen(ident) + 1]; data/libcommoncpp2-1.8.1/src/slog.cpp:222:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). thread->_msgpos = strlen(thread->_msgbuf); data/libcommoncpp2-1.8.1/src/slog.cpp:239:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). thread->_msgpos = strlen(thread->_msgbuf); data/libcommoncpp2-1.8.1/src/slog.cpp:256:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). thread->_msgpos = strlen(thread->_msgbuf); data/libcommoncpp2-1.8.1/src/slog.cpp:273:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). thread->_msgpos = strlen(thread->_msgbuf); data/libcommoncpp2-1.8.1/src/slog.cpp:290:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). thread->_msgpos = strlen(thread->_msgbuf); data/libcommoncpp2-1.8.1/src/slog.cpp:307:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). thread->_msgpos = strlen(thread->_msgbuf); data/libcommoncpp2-1.8.1/src/slog.cpp:324:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). thread->_msgpos = strlen(thread->_msgbuf); data/libcommoncpp2-1.8.1/src/slog.cpp:341:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). thread->_msgpos = strlen(thread->_msgbuf); data/libcommoncpp2-1.8.1/src/socket.cpp:3484:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rlen = ::read((int)so, (char *)&ch, 1); data/libcommoncpp2-1.8.1/src/socket.cpp:3510:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rlen = ::read((int)so, (char *)eback(), _IOLEN64 rlen); data/libcommoncpp2-1.8.1/src/socket.cpp:3564:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buf); data/libcommoncpp2-1.8.1/src/socketport.cpp:698:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(1 == ::read(iosync[0], (char *)&buf, 1)) { data/libcommoncpp2-1.8.1/src/strchar.cpp:63:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/libcommoncpp2-1.8.1/src/strchar.cpp:78:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/libcommoncpp2-1.8.1/src/strchar.cpp:92:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/libcommoncpp2-1.8.1/src/strchar.cpp:120:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/libcommoncpp2-1.8.1/src/strchar.cpp:142:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/libcommoncpp2-1.8.1/src/strchar.cpp:166:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(src); data/libcommoncpp2-1.8.1/src/strchar.cpp:185:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(src); data/libcommoncpp2-1.8.1/src/strchar.cpp:204:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = strlen(string); data/libcommoncpp2-1.8.1/src/strchar.cpp:220:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = strlen(string); data/libcommoncpp2-1.8.1/src/strchar.cpp:233:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(src); data/libcommoncpp2-1.8.1/src/strchar.cpp:256:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(dest); data/libcommoncpp2-1.8.1/src/strchar.cpp:268:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = strlen(src) + 1; data/libcommoncpp2-1.8.1/src/string.cpp:113:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). setLength(strlen(ptr)); data/libcommoncpp2-1.8.1/src/string.cpp:173: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). chars = strlen(str); data/libcommoncpp2-1.8.1/src/string.cpp:258:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/libcommoncpp2-1.8.1/src/string.cpp:358:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). setLength(strlen(ptr)); data/libcommoncpp2-1.8.1/src/string.cpp:377:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). setLength(strlen(getText())); data/libcommoncpp2-1.8.1/src/string.cpp:390:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/libcommoncpp2-1.8.1/src/string.cpp:455:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). clen = strlen(cp); data/libcommoncpp2-1.8.1/src/string.cpp:473:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(cp); data/libcommoncpp2-1.8.1/src/string.cpp:492:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(cp); data/libcommoncpp2-1.8.1/src/string.cpp:510:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(cp); data/libcommoncpp2-1.8.1/src/string.cpp:954: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). str.setLength(strlen(ptr)); data/libcommoncpp2-1.8.1/src/string.cpp:1013: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). str.setLength(strlen(ptr)); data/libcommoncpp2-1.8.1/src/unix.cpp:73:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned slen = strlen(pathname); data/libcommoncpp2-1.8.1/src/unix.cpp:84:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = sizeof(addr.sun_len) + strlen(addr.sun_path) + sizeof(addr.sun_family) + 1; data/libcommoncpp2-1.8.1/src/unix.cpp:87:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(addr.sun_path) + sizeof(addr.sun_family) + 1; data/libcommoncpp2-1.8.1/src/unix.cpp:169:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned slen = strlen(pathname); data/libcommoncpp2-1.8.1/src/unix.cpp:178:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = sizeof(addr.sun_len) + strlen(addr.sun_path) + sizeof(addr.sun_family) + 1; data/libcommoncpp2-1.8.1/src/unix.cpp:181:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(addr.sun_path) + sizeof(addr.sun_family); data/libcommoncpp2-1.8.1/src/unix.cpp:289:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rlen = ::read(so, (char *)&ch, 1); data/libcommoncpp2-1.8.1/src/unix.cpp:315:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rlen = ::read(so, (char *)eback(), rlen); data/libcommoncpp2-1.8.1/src/unix.cpp:460:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned slen = strlen(pathname); data/libcommoncpp2-1.8.1/src/unix.cpp:474:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = sizeof(addr.sun_len) + strlen(addr.sun_path) + sizeof(addr.sun_family) + 1; data/libcommoncpp2-1.8.1/src/unix.cpp:477:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(addr.sun_path) + sizeof(addr.sun_family); data/libcommoncpp2-1.8.1/src/url.cpp:314:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buffer); data/libcommoncpp2-1.8.1/src/url.cpp:624: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). len += strlen(var) + 1; data/libcommoncpp2-1.8.1/src/url.cpp:626:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(var); data/libcommoncpp2-1.8.1/src/url.cpp:752:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). writeData(reloc, strlen(reloc)); data/libcommoncpp2-1.8.1/src/url.cpp:755: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). writeData(var, strlen(var)); data/libcommoncpp2-1.8.1/src/url.cpp:817:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ep = (char *)(url + strlen(url) - 1); data/libcommoncpp2-1.8.1/src/urlstring.cpp:73:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). b64Encode((const unsigned char*)source,strlen(source), data/libcommoncpp2-1.8.1/src/urlstring.cpp:80:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t srcsize = strlen(source); data/libcommoncpp2-1.8.1/src/xml.cpp:356:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((res = read((unsigned char *)buffer, 1024))) data/libcommoncpp2-1.8.1/tests/SampleObject.cpp:93:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool Test::read(Engine& archive) data/libcommoncpp2-1.8.1/tests/SampleObject.h:81:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual bool read(Engine& archive); data/libcommoncpp2-1.8.1/tests/SampleSubObject.cpp:73:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool TestSub::read(Engine& archive) data/libcommoncpp2-1.8.1/tests/SampleSubObject.h:72:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual bool read(Engine& archive); data/libcommoncpp2-1.8.1/tests/Test_URLString.h:130:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). b64Encode((const unsigned char *)inputChars, strlen(inputChars), actualEncodedChars, sizeof(actualEncodedChars)); data/libcommoncpp2-1.8.1/tests/Test_URLString.h:140:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). b64Encode((const unsigned char *)inputChars, strlen(inputChars), actualEncodedChars, sizeof(actualEncodedChars)); data/libcommoncpp2-1.8.1/tests/Test_URLString.h:153:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). b64Encode((const unsigned char *)inputChars, strlen(inputChars), actualEncodedChars, sizeof(actualEncodedChars)); data/libcommoncpp2-1.8.1/tests/Test_URLString.h:162:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). b64Encode((const unsigned char *)inputChars, strlen(inputChars), actualEncodedChars, sizeof(actualEncodedChars)); data/libcommoncpp2-1.8.1/tests/Test_URLString.h:186:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). b64Encode((const unsigned char *)inputChars, strlen(inputChars), actualEncodedChars, sizeof(actualEncodedChars)); data/libcommoncpp2-1.8.1/tests/url1.cpp:66: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). size_t buflen2 = strlen(buf1+16)+1; data/libcommoncpp2-1.8.1/tests/url1.cpp:78:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). bool execCheck2 = (strlen(s) == len); ANALYSIS SUMMARY: Hits = 526 Lines analyzed = 52545 in approximately 1.23 seconds (42822 lines/second) Physical Source Lines of Code (SLOC) = 30360 Hits@level = [0] 146 [1] 167 [2] 283 [3] 23 [4] 52 [5] 1 Hits@level+ = [0+] 672 [1+] 526 [2+] 359 [3+] 76 [4+] 53 [5+] 1 Hits/KSLOC@level+ = [0+] 22.1344 [1+] 17.3254 [2+] 11.8248 [3+] 2.50329 [4+] 1.74572 [5+] 0.0329381 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.