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/czmq-4.2.0/include/ztrie.h Examining data/czmq-4.2.0/include/zargs.h Examining data/czmq-4.2.0/include/zhttp_request.h Examining data/czmq-4.2.0/include/zhttp_server.h Examining data/czmq-4.2.0/include/zhashx.h Examining data/czmq-4.2.0/include/zdir_patch.h Examining data/czmq-4.2.0/include/zsock.h Examining data/czmq-4.2.0/include/ztimerset.h Examining data/czmq-4.2.0/include/zlist.h Examining data/czmq-4.2.0/include/zmsg.h Examining data/czmq-4.2.0/include/zloop.h Examining data/czmq-4.2.0/include/zgossip.h Examining data/czmq-4.2.0/include/zdigest.h Examining data/czmq-4.2.0/include/zconfig.h Examining data/czmq-4.2.0/include/zhttp_server_options.h Examining data/czmq-4.2.0/include/zpoller.h Examining data/czmq-4.2.0/include/zsys.h Examining data/czmq-4.2.0/include/zmonitor.h Examining data/czmq-4.2.0/include/zhttp_client.h Examining data/czmq-4.2.0/include/zhash.h Examining data/czmq-4.2.0/include/zarmour.h Examining data/czmq-4.2.0/include/zbeacon.h Examining data/czmq-4.2.0/include/zstr.h Examining data/czmq-4.2.0/include/czmq_library.h Examining data/czmq-4.2.0/include/ziflist.h Examining data/czmq-4.2.0/include/zactor.h Examining data/czmq-4.2.0/include/zlistx.h Examining data/czmq-4.2.0/include/zproc.h Examining data/czmq-4.2.0/include/zuuid.h Examining data/czmq-4.2.0/include/zclock.h Examining data/czmq-4.2.0/include/zfile.h Examining data/czmq-4.2.0/include/zdir.h Examining data/czmq-4.2.0/include/czmq_prelude.h Examining data/czmq-4.2.0/include/zproxy.h Examining data/czmq-4.2.0/include/czmq.h Examining data/czmq-4.2.0/include/zhttp_response.h Examining data/czmq-4.2.0/include/zrex.h Examining data/czmq-4.2.0/include/zcertstore.h Examining data/czmq-4.2.0/include/zcert.h Examining data/czmq-4.2.0/include/zchunk.h Examining data/czmq-4.2.0/include/zauth.h Examining data/czmq-4.2.0/include/zframe.h Examining data/czmq-4.2.0/bindings/nodejs/binding.h Examining data/czmq-4.2.0/bindings/nodejs/binding.cc Examining data/czmq-4.2.0/bindings/qml/src/QmlZproc.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZhashx.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZframe.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZiflist.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZtimerset.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZhttpRequest.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZhttpClient.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZdigest.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZfile.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZconfig.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZiflist.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZproc.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZsock.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZhttpServer.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZframe.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZcert.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZclock.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZdir.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZfile.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZclock.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZactor.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZtimerset.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZloop.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZhttpServer.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZcert.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZhttpServerOptions.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZhttpRequest.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZchunk.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZhttpServerConnection.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZarmour.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZtrie.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZpoller.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZargs.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZargs.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZhash.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZtrie.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZlist.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZsys.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZdir.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZmsg.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZsys.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZcertstore.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZlist.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZsock.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZuuid.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZmsg.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZhttpResponse.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZhttpClient.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZactor.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZcertstore.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZdirPatch.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZdigest.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZhash.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZchunk.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZdirPatch.cpp Examining data/czmq-4.2.0/bindings/qml/src/qml_czmq_plugin.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZhttpResponse.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZstr.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZhttpServerConnection.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZpoller.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZloop.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZhashx.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZuuid.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZhttpServerOptions.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZlistx.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZstr.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZlistx.cpp Examining data/czmq-4.2.0/bindings/qml/src/QmlZarmour.h Examining data/czmq-4.2.0/bindings/qml/src/QmlZconfig.cpp Examining data/czmq-4.2.0/bindings/qt/selftest/main.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzsock.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzhttprequest.h Examining data/czmq-4.2.0/bindings/qt/src/qzproc.h Examining data/czmq-4.2.0/bindings/qt/src/qztrie.h Examining data/czmq-4.2.0/bindings/qt/src/qzhttprequest.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzloop.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzdigest.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzargs.h Examining data/czmq-4.2.0/bindings/qt/src/qzdir.h Examining data/czmq-4.2.0/bindings/qt/src/qzhttpresponse.h Examining data/czmq-4.2.0/bindings/qt/src/qzhashx.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzpoller.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzhttpresponse.cpp Examining data/czmq-4.2.0/bindings/qt/src/qztimerset.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzcertstore.h Examining data/czmq-4.2.0/bindings/qt/src/qzpoller.h Examining data/czmq-4.2.0/bindings/qt/src/qzframe.h Examining data/czmq-4.2.0/bindings/qt/src/qzhttpclient.h Examining data/czmq-4.2.0/bindings/qt/src/qzchunk.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzhttpclient.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzclock.h Examining data/czmq-4.2.0/bindings/qt/src/qzsys.h Examining data/czmq-4.2.0/bindings/qt/src/qzmsg.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzhttpserver.h Examining data/czmq-4.2.0/bindings/qt/src/qzcert.cpp Examining data/czmq-4.2.0/bindings/qt/src/qztimerset.h Examining data/czmq-4.2.0/bindings/qt/src/qzlist.h Examining data/czmq-4.2.0/bindings/qt/src/qzfile.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzsock.h Examining data/czmq-4.2.0/bindings/qt/src/qzcert.h Examining data/czmq-4.2.0/bindings/qt/src/qzdirpatch.h Examining data/czmq-4.2.0/bindings/qt/src/qzargs.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzhttpserveroptions.h Examining data/czmq-4.2.0/bindings/qt/src/qzchunk.h Examining data/czmq-4.2.0/bindings/qt/src/qztrie.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzuuid.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzdir.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzuuid.h Examining data/czmq-4.2.0/bindings/qt/src/qzhttpserverconnection.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzlistx.h Examining data/czmq-4.2.0/bindings/qt/src/qzsys.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzlistx.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzmsg.h Examining data/czmq-4.2.0/bindings/qt/src/qzactor.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzhttpserveroptions.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzclock.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzdirpatch.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzlist.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzhashx.h Examining data/czmq-4.2.0/bindings/qt/src/qzproc.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzhash.h Examining data/czmq-4.2.0/bindings/qt/src/qzframe.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzstr.cpp Examining data/czmq-4.2.0/bindings/qt/src/qziflist.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzactor.h Examining data/czmq-4.2.0/bindings/qt/src/qzfile.h Examining data/czmq-4.2.0/bindings/qt/src/qzconfig.h Examining data/czmq-4.2.0/bindings/qt/src/qczmq.h Examining data/czmq-4.2.0/bindings/qt/src/qzhttpserver.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzhttpserverconnection.h Examining data/czmq-4.2.0/bindings/qt/src/qzarmour.cpp Examining data/czmq-4.2.0/bindings/qt/src/qziflist.h Examining data/czmq-4.2.0/bindings/qt/src/qzstr.h Examining data/czmq-4.2.0/bindings/qt/src/qzconfig.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzarmour.h Examining data/czmq-4.2.0/bindings/qt/src/qzcertstore.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzhash.cpp Examining data/czmq-4.2.0/bindings/qt/src/qzdigest.h Examining data/czmq-4.2.0/bindings/qt/src/qzloop.h Examining data/czmq-4.2.0/bindings/jni/msvc/resource.h Examining data/czmq-4.2.0/bindings/jni/msvc/platform.h Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zcertstore.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zsys.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zmsg.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zclock.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Ztrie.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zarmour.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zsock.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zstr.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zconfig.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zcert.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zhashx.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Ztimerset.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_ZhttpServer.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zdir.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zloop.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Ziflist.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zproc.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zdigest.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zhash.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zfile.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_ZdirPatch.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zuuid.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_ZhttpResponse.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zchunk.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zlistx.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zframe.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zpoller.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_ZhttpClient.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_ZhttpRequest.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_Zlist.c Examining data/czmq-4.2.0/bindings/jni/src/main/c/org_zeromq_czmq_ZhttpServerOptions.c Examining data/czmq-4.2.0/src/zhttp_server.c Examining data/czmq-4.2.0/src/zauth.c Examining data/czmq-4.2.0/src/zmsg.c Examining data/czmq-4.2.0/src/zhttp_server_options.c Examining data/czmq-4.2.0/src/zdigest.c Examining data/czmq-4.2.0/src/czmq_private_selftest.c Examining data/czmq-4.2.0/src/zproc.c Examining data/czmq-4.2.0/src/zclock.c Examining data/czmq-4.2.0/src/zgossip_msg.c Examining data/czmq-4.2.0/src/zcert.c Examining data/czmq-4.2.0/src/zsys.c Examining data/czmq-4.2.0/src/zdir_patch.c Examining data/czmq-4.2.0/src/czmq_selftest.c Examining data/czmq-4.2.0/src/zrex.c Examining data/czmq-4.2.0/src/foreign/sha1/sha1.h Examining data/czmq-4.2.0/src/foreign/slre/slre.h Examining data/czmq-4.2.0/src/ztrie.c Examining data/czmq-4.2.0/src/zhash.c Examining data/czmq-4.2.0/src/zsp.c Examining data/czmq-4.2.0/src/zargs.c Examining data/czmq-4.2.0/src/zlistx.c Examining data/czmq-4.2.0/src/zsock.c Examining data/czmq-4.2.0/src/zhttp_response.c Examining data/czmq-4.2.0/src/zconfig.c Examining data/czmq-4.2.0/src/zhashx.c Examining data/czmq-4.2.0/src/zcertstore.c Examining data/czmq-4.2.0/src/zproxy.c Examining data/czmq-4.2.0/src/test_randof.c Examining data/czmq-4.2.0/src/zactor.c Examining data/czmq-4.2.0/src/zgossip.c Examining data/czmq-4.2.0/src/platform.h Examining data/czmq-4.2.0/src/zuuid.c Examining data/czmq-4.2.0/src/zloop.c Examining data/czmq-4.2.0/src/zbeacon.c Examining data/czmq-4.2.0/src/ziflist.c Examining data/czmq-4.2.0/src/zmonitor.c Examining data/czmq-4.2.0/src/zpoller.c Examining data/czmq-4.2.0/src/zmakecert.c Examining data/czmq-4.2.0/src/zlist.c Examining data/czmq-4.2.0/src/czmq_classes.h Examining data/czmq-4.2.0/src/zfile.c Examining data/czmq-4.2.0/src/zhttp_request.c Examining data/czmq-4.2.0/src/zchunk.c Examining data/czmq-4.2.0/src/ztimerset.c Examining data/czmq-4.2.0/src/zgossip_msg.h Examining data/czmq-4.2.0/src/zstr.c Examining data/czmq-4.2.0/src/zhttp_client.c Examining data/czmq-4.2.0/src/zframe.c Examining data/czmq-4.2.0/src/zdir.c Examining data/czmq-4.2.0/src/zarmour.c FINAL RESULTS: data/czmq-4.2.0/bindings/qml/src/QmlZsys.cpp:197:32: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. const QString QmlZsysAttached::sprintf (const QString &format) { data/czmq-4.2.0/bindings/qml/src/QmlZsys.cpp:205:32: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. const QString QmlZsysAttached::vprintf (const QString &format, va_list argptr) { data/czmq-4.2.0/bindings/qml/src/QmlZsys.h:151:19: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. const QString sprintf (const QString &format); data/czmq-4.2.0/bindings/qml/src/QmlZsys.h:156:19: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. const QString vprintf (const QString &format, va_list argptr); data/czmq-4.2.0/bindings/qt/src/qzsys.cpp:213:22: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. const QString QZsys::vprintf (const QString &format, va_list argptr) data/czmq-4.2.0/bindings/qt/src/qzsys.h:114:26: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. static const QString vprintf (const QString &format, va_list argptr); data/czmq-4.2.0/include/czmq_prelude.h:545:16: [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/czmq-4.2.0/include/czmq_prelude.h:545:25: [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/czmq-4.2.0/include/czmq_prelude.h:546:16: [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/czmq-4.2.0/include/czmq_prelude.h:658:53: [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. # define CHECK_PRINTF(a) __attribute__((format (printf, a, a + 1))) data/czmq-4.2.0/src/zbeacon.c:195:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (address_and_iface, zsys_ipv6_address ()); data/czmq-4.2.0/src/zbeacon.c:197:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (address_and_iface, iface); data/czmq-4.2.0/src/zcert.c:95: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 (self->public_txt, FORTY_ZEROES); data/czmq-4.2.0/src/zcert.c:96: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 (self->secret_txt, FORTY_ZEROES); data/czmq-4.2.0/src/zcert.c:121: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 (self->public_txt, FORTY_ZEROES); data/czmq-4.2.0/src/zcert.c:122:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (self->secret_txt, FORTY_ZEROES); data/czmq-4.2.0/src/zclock.c:203:5: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf (format, argptr); data/czmq-4.2.0/src/zdir.c:121:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (self->path, "%s/%s", parent, path); data/czmq-4.2.0/src/zdir.c:162:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (wildcard, "%s/*", self->path); data/czmq-4.2.0/src/zdir.c:594:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (cache_file, "%s/.cache", self->path); data/czmq-4.2.0/src/zdir_patch.c:61:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (self->vpath, "%s%s", alias, filename); data/czmq-4.2.0/src/zdir_patch.c:63:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (self->vpath, "%s/%s", alias, filename); data/czmq-4.2.0/src/zfile.c:79:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (self->fullname, "%s/%s", path, name); data/czmq-4.2.0/src/zframe.c:185: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 (self->group, zmq_msg_group (&self->zmsg)); data/czmq-4.2.0/src/zframe.c:453: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 (self->group, group); data/czmq-4.2.0/src/zframe.c:535:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (buffer, ellipsis); data/czmq-4.2.0/src/zframe.c:577: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 (self->group, zmq_msg_group (&self->zmsg)); data/czmq-4.2.0/src/zhttp_request.c:107: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 (self->method, method); data/czmq-4.2.0/src/zhttp_request.c:143: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 (self->method, method); data/czmq-4.2.0/src/ziflist.c:82:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (hbuf, name); data/czmq-4.2.0/src/zsys.c:981:20: [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. int required = vsnprintf (string, size, format, my_argptr); data/czmq-4.2.0/src/zsys.c:989:20: [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. required = vsnprintf (NULL, 0, format, argptr); data/czmq-4.2.0/src/zsys.c:1011:13: [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 (string, size, format, my_argptr); data/czmq-4.2.0/src/zsys.c:1155:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (peername, ifname); data/czmq-4.2.0/src/ztrie.c:737:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (data, "%s", "Hello World!"); data/czmq-4.2.0/include/czmq_prelude.h:469:33: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. # define ZSYS_RANDOF_FUNC random data/czmq-4.2.0/include/czmq_prelude.h:542:12: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. # define srandom srand data/czmq-4.2.0/include/czmq_prelude.h:542:20: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. # define srandom srand data/czmq-4.2.0/src/test_randof.c:145:5: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom (random_seed); data/czmq-4.2.0/src/zhash.c:910:5: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom ((unsigned) time (NULL)); data/czmq-4.2.0/src/zhashx.c:1272:5: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom ((unsigned) time (NULL)); data/czmq-4.2.0/src/zproxy.c:477:5: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom ((uint) (time (NULL) ^ *(int *) proxy)); data/czmq-4.2.0/src/zproxy.c:574: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. if (getenv("USER") && streq(getenv("USER"), "vagrant")) data/czmq-4.2.0/src/zproxy.c:574:33: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("USER") && streq(getenv("USER"), "vagrant")) data/czmq-4.2.0/src/zproxy.c:585: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. if (getenv("USER") && streq(getenv("USER"), "vagrant")) data/czmq-4.2.0/src/zproxy.c:585:33: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("USER") && streq(getenv("USER"), "vagrant")) data/czmq-4.2.0/src/zsp.c:93: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. if (getenv ("ZSP_MESSAGE")) data/czmq-4.2.0/src/zsp.c:94:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. message = getenv ("ZSP_MESSAGE"); data/czmq-4.2.0/src/zsys.c:128:30: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. # define ZMUTEX_INIT(m) InitializeCriticalSection (&m); data/czmq-4.2.0/src/zsys.c:129:30: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. # define ZMUTEX_LOCK(m) EnterCriticalSection (&m); data/czmq-4.2.0/src/zsys.c:158: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. if (getenv ("ZSYS_IO_THREADS")) data/czmq-4.2.0/src/zsys.c:159:30: [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. s_io_threads = atoi (getenv ("ZSYS_IO_THREADS")); data/czmq-4.2.0/src/zsys.c:161: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. if (getenv ("ZSYS_MAX_SOCKETS")) data/czmq-4.2.0/src/zsys.c:162:31: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. s_max_sockets = atoi (getenv ("ZSYS_MAX_SOCKETS")); data/czmq-4.2.0/src/zsys.c:164: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. if (getenv ("ZSYS_MAX_MSGSZ")) data/czmq-4.2.0/src/zsys.c:165:29: [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. s_max_msgsz = atoi (getenv ("ZSYS_MAX_MSGSZ")); data/czmq-4.2.0/src/zsys.c:167: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. if (getenv ("ZSYS_ZERO_COPY_RECV")) data/czmq-4.2.0/src/zsys.c:168:34: [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. s_zero_copy_recv = atoi (getenv ("ZSYS_ZERO_COPY_RECV")); data/czmq-4.2.0/src/zsys.c:170: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. if (getenv ("ZSYS_FILE_STABLE_AGE_MSEC")) data/czmq-4.2.0/src/zsys.c:171:40: [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. s_file_stable_age_msec = atoi (getenv ("ZSYS_FILE_STABLE_AGE_MSEC")); data/czmq-4.2.0/src/zsys.c:173: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. if (getenv ("ZSYS_LINGER")) data/czmq-4.2.0/src/zsys.c:174:26: [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. s_linger = atoi (getenv ("ZSYS_LINGER")); data/czmq-4.2.0/src/zsys.c:176: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. if (getenv ("ZSYS_SNDHWM")) data/czmq-4.2.0/src/zsys.c:177:26: [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. s_sndhwm = atoi (getenv ("ZSYS_SNDHWM")); data/czmq-4.2.0/src/zsys.c:179: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. if (getenv ("ZSYS_RCVHWM")) data/czmq-4.2.0/src/zsys.c:180:26: [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. s_rcvhwm = atoi (getenv ("ZSYS_RCVHWM")); data/czmq-4.2.0/src/zsys.c:182: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. if (getenv ("ZSYS_PIPEHWM")) data/czmq-4.2.0/src/zsys.c:183:27: [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. s_pipehwm = atoi (getenv ("ZSYS_PIPEHWM")); data/czmq-4.2.0/src/zsys.c:185: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. if (getenv ("ZSYS_IPV6")) data/czmq-4.2.0/src/zsys.c:186:24: [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. s_ipv6 = atoi (getenv ("ZSYS_IPV6")); data/czmq-4.2.0/src/zsys.c:188: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. if (getenv ("ZSYS_LOGSTREAM")) { data/czmq-4.2.0/src/zsys.c:189:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (streq (getenv ("ZSYS_LOGSTREAM"), "stdout")) data/czmq-4.2.0/src/zsys.c:192:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (streq (getenv ("ZSYS_LOGSTREAM"), "stderr")) data/czmq-4.2.0/src/zsys.c:198: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. if (getenv ("ZSYS_LOGSYSTEM")) { data/czmq-4.2.0/src/zsys.c:199:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (streq (getenv ("ZSYS_LOGSYSTEM"), "true")) data/czmq-4.2.0/src/zsys.c:202:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (streq (getenv ("ZSYS_LOGSYSTEM"), "false")) data/czmq-4.2.0/src/zsys.c:206: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. if (getenv ("ZSYS_AUTO_USE_FD")) data/czmq-4.2.0/src/zsys.c:207:31: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. s_auto_use_fd = atoi (getenv ("ZSYS_AUTO_USE_FD")); data/czmq-4.2.0/src/zsys.c:217:5: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom ((unsigned) time (NULL)); data/czmq-4.2.0/src/zsys.c:231: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. if (getenv ("ZSYS_INTERFACE")) data/czmq-4.2.0/src/zsys.c:232:29: [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. zsys_set_interface (getenv ("ZSYS_INTERFACE")); data/czmq-4.2.0/src/zsys.c:234: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. if (getenv ("ZSYS_IPV6_ADDRESS")) data/czmq-4.2.0/src/zsys.c:235:32: [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. zsys_set_ipv6_address (getenv ("ZSYS_IPV6_ADDRESS")); data/czmq-4.2.0/src/zsys.c:237: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. if (getenv ("ZSYS_IPV6_MCAST_ADDRESS")) data/czmq-4.2.0/src/zsys.c:238:38: [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. zsys_set_ipv6_mcast_address (getenv ("ZSYS_IPV6_MCAST_ADDRESS")); data/czmq-4.2.0/src/zsys.c:243: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. if (getenv ("ZSYS_LOGIDENT")) data/czmq-4.2.0/src/zsys.c:244:28: [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. zsys_set_logident (getenv ("ZSYS_LOGIDENT")); data/czmq-4.2.0/src/zsys.c:246: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. if (getenv ("ZSYS_LOGSENDER")) data/czmq-4.2.0/src/zsys.c:247:29: [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. zsys_set_logsender (getenv ("ZSYS_LOGSENDER")); data/czmq-4.2.0/src/zsys.c:257: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. if (getenv ("ZSYS_THREAD_PRIORITY")) data/czmq-4.2.0/src/zsys.c:258:41: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. zsys_set_thread_priority (atoi (getenv ("ZSYS_THREAD_PRIORITY"))); data/czmq-4.2.0/src/zsys.c:262: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. if (getenv ("ZSYS_THREAD_SCHED_POLICY")) data/czmq-4.2.0/src/zsys.c:263:45: [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. zsys_set_thread_sched_policy (atoi (getenv ("ZSYS_THREAD_SCHED_POLICY"))); data/czmq-4.2.0/src/zsys.c:267: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. if (getenv ("ZSYS_THREAD_NAME_PREFIX")) data/czmq-4.2.0/src/zsys.c:268:44: [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. zsys_set_thread_name_prefix (atoi (getenv ("ZSYS_THREAD_NAME_PREFIX"))); data/czmq-4.2.0/src/zsys.c:609:10: [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 ("ZSYS_SIGHANDLER") == NULL data/czmq-4.2.0/src/zsys.c:610: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. || strneq (getenv ("ZSYS_SIGHANDLER"), "false")) data/czmq-4.2.0/bindings/nodejs/binding.cc:394: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 result [2] = " "; data/czmq-4.2.0/src/foreign/slre/slre.h:56: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 code[256]; data/czmq-4.2.0/src/foreign/slre/slre.h:57: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 data[256]; data/czmq-4.2.0/src/zarmour.c:440: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 (dest, src, self->line_length); data/czmq-4.2.0/src/zarmour.c:444: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 (dest, line_end, strlen (line_end)); data/czmq-4.2.0/src/zarmour.c:449: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 (dest, src, strlen (src)); data/czmq-4.2.0/src/zauth.c:333: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 (ptr, name, name_len); data/czmq-4.2.0/src/zauth.c:338: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 (ptr, value, value_len); data/czmq-4.2.0/src/zauth.c:675:22: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *password = fopen (passfilepath, "w"); data/czmq-4.2.0/src/zbeacon.c:40: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 port_nbr [7]; // UDP port number we work on data/czmq-4.2.0/src/zbeacon.c:48: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 hostname [NI_MAXHOST]; // Saved host name data/czmq-4.2.0/src/zbeacon.c:157:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int if_number = atoi (iface); data/czmq-4.2.0/src/zbeacon.c:194: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 address_and_iface [NI_MAXHOST] = {0}; data/czmq-4.2.0/src/zbeacon.c:246: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 (&bind_address, bind_to->ai_addr, bind_to->ai_addrlen); data/czmq-4.2.0/src/zbeacon.c:248: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 (&bind_address, send_to->ai_addr, send_to->ai_addrlen); data/czmq-4.2.0/src/zbeacon.c:254: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 (&self->broadcast, send_to->ai_addr, send_to->ai_addrlen); data/czmq-4.2.0/src/zbeacon.c:259: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 (&mreq.ipv6mr_multiaddr, data/czmq-4.2.0/src/zbeacon.c:396: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 peername [NI_MAXHOST]; data/czmq-4.2.0/src/zbeacon.c:455: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, &self->broadcast, sizeof (inaddr_t)); data/czmq-4.2.0/src/zcert.c:42:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char public_txt [41]; // Public key in Z85 text data/czmq-4.2.0/src/zcert.c:43: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 secret_txt [41]; // Secret key in Z85 text data/czmq-4.2.0/src/zcert.c:62: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 public_txt [41]; data/czmq-4.2.0/src/zcert.c:63: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 secret_txt [41]; data/czmq-4.2.0/src/zcert.c:89: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 (self->public_key, public_key, 32); data/czmq-4.2.0/src/zcert.c:90: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 (self->secret_key, secret_key, 32); data/czmq-4.2.0/src/zcert.c:115: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 (self->public_txt, public_txt, 41); data/czmq-4.2.0/src/zcert.c:116: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 (self->secret_txt, secret_txt, 41); data/czmq-4.2.0/src/zcert.c:255:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename_secret [256]; data/czmq-4.2.0/src/zcert.c: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 filename_secret [256]; data/czmq-4.2.0/src/zchunk.c:64: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 (self->data, data, self->size); data/czmq-4.2.0/src/zchunk.c:202: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 (self->data, data, size); data/czmq-4.2.0/src/zchunk.c:243: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 (self->data + self->size, data, size); data/czmq-4.2.0/src/zchunk.c:264: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 (self->data, old_data, self->size); data/czmq-4.2.0/src/zchunk.c:277: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 (self->data, old_data, self->size); data/czmq-4.2.0/src/zchunk.c:283: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 (self->data + self->size, data, size); data/czmq-4.2.0/src/zchunk.c:310: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 (self->data + self->size, source->data + source->consumed, size); data/czmq-4.2.0/src/zchunk.c:378:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *handle = fopen (filename, "r"); data/czmq-4.2.0/src/zchunk.c:445: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 (string, zchunk_data (self), size); data/czmq-4.2.0/src/zchunk.c:602: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 ((char*)*hint, "world"); data/czmq-4.2.0/src/zclock.c:181: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 formatted [20]; data/czmq-4.2.0/src/zclock.c:197: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 formatted [20]; data/czmq-4.2.0/src/zconfig.c:495:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen (filename, "w"); data/czmq-4.2.0/src/zconfig.c:680: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 cur_line [1024 + 1]; data/czmq-4.2.0/src/zconfig.c:681: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 (cur_line, data_ptr, cur_size); data/czmq-4.2.0/src/zconfig.c:796: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 (name, readptr, length); data/czmq-4.2.0/src/zconfig.c:855: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 (value, readptr + 1, value_length); data/czmq-4.2.0/src/zdigest.c:37: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 string [SHA_DIGEST_LENGTH * 2 + 1]; data/czmq-4.2.0/src/zdir.c:68: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 fullpath [1024 + 1]; data/czmq-4.2.0/src/zdir.c:883:27: [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 timeout = atoi (timeout_string); data/czmq-4.2.0/src/zfile.c:87:24: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *handle = fopen (self->fullname, "r"); data/czmq-4.2.0/src/zfile.c:89: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 buffer [256]; data/czmq-4.2.0/src/zfile.c: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 name [MAX_PATH]; data/czmq-4.2.0/src/zfile.c:129: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 [MAX_PATH]; data/czmq-4.2.0/src/zfile.c:142:20: [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). self->handle = fopen (self->fullname, "w"); data/czmq-4.2.0/src/zfile.c:146: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 [PATH_MAX]; data/czmq-4.2.0/src/zfile.c:149: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 [_MAX_PATH]; data/czmq-4.2.0/src/zfile.c:151: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/czmq-4.2.0/src/zfile.c:156:14: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). int fd = mkstemp (buffer); data/czmq-4.2.0/src/zfile.c:413:20: [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). self->handle = fopen (real_name, "rb"); data/czmq-4.2.0/src/zfile.c:462:20: [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). self->handle = fopen (self->fullname, "r+b"); data/czmq-4.2.0/src/zfile.c:464:24: [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). self->handle = fopen (self->fullname, "w+b"); data/czmq-4.2.0/src/zfile.c:782: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). int handle = open (filepath, O_WRONLY | O_TRUNC | O_BINARY, 0); data/czmq-4.2.0/src/zframe.c:41: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 group[ZMQ_GROUP_MAX_LENGTH + 1]; data/czmq-4.2.0/src/zframe.c:64: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 (zmq_msg_data (&self->zmsg), data, size); data/czmq-4.2.0/src/zframe.c:348: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 (string, zframe_data (self), size); data/czmq-4.2.0/src/zframe.c:497: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 (zmq_msg_data (&self->zmsg), data, size); data/czmq-4.2.0/src/zframe.c:521: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/czmq-4.2.0/src/zframe.c:531:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (buffer + strlen (buffer), "%02X", (unsigned char) data [char_nbr]); data/czmq-4.2.0/src/zframe.c:533:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (buffer + strlen (buffer), "%c", data [char_nbr]); data/czmq-4.2.0/src/zframe.c:627: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 ((char*)*hint, "world"); data/czmq-4.2.0/src/zgossip.c:634:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). assert (atoi (status) == 4); data/czmq-4.2.0/src/zgossip.c:676: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). int port = atoi (value); data/czmq-4.2.0/src/zgossip.c:679: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 endpoint [32]; data/czmq-4.2.0/src/zgossip.c:680: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 (endpoint, "tcp://127.0.0.1:%d", port); data/czmq-4.2.0/src/zgossip_msg.c:42:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char key [256]; // Tuple key, globally unique data/czmq-4.2.0/src/zgossip_msg.c:52: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 (self->needle, (host), size); \ data/czmq-4.2.0/src/zgossip_msg.c:62: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 ((host), self->needle, size); \ data/czmq-4.2.0/src/zgossip_msg.c:156: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 (self->needle, (host), string_size); \ data/czmq-4.2.0/src/zgossip_msg.c: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 ((host), self->needle, string_size); \ data/czmq-4.2.0/src/zgossip_msg.c:177: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 (self->needle, (host), string_size); \ data/czmq-4.2.0/src/zgossip_msg.c:191: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 ((host), self->needle, string_size); \ data/czmq-4.2.0/src/zhash.c:537:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *handle = fopen (filename, "w"); data/czmq-4.2.0/src/zhash.c:585:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *handle = fopen (self->filename, "r"); data/czmq-4.2.0/src/zhash.c:700: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 (needle, item->key, length); data/czmq-4.2.0/src/zhash.c:706: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 (needle, &serialize, 4); data/czmq-4.2.0/src/zhash.c:708: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 (needle, (char *) item->value, length); data/czmq-4.2.0/src/zhash.c:740: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 key [256]; data/czmq-4.2.0/src/zhash.c:741: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 (key, needle, key_size); data/czmq-4.2.0/src/zhash.c:752:21: [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 (value, needle, value_size); data/czmq-4.2.0/src/zhash.c:904: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 name [100]; data/czmq-4.2.0/src/zhash.c:916: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. item = (char *) zhash_lookup (hash, testset [testnbr].name); data/czmq-4.2.0/src/zhash.c:922:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (testset [testnbr].name, "%x-%x", rand (), rand ()); data/czmq-4.2.0/src/zhash.c:940: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 value [255]; data/czmq-4.2.0/src/zhash.c:941: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 (value, "This is a string"); data/czmq-4.2.0/src/zhash.c:944: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 (value, "Inserting with the same key will fail"); data/czmq-4.2.0/src/zhash.c:947: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 (value, "Ring a ding ding"); data/czmq-4.2.0/src/zhashx.c:659:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *handle = fopen (filename, "w"); data/czmq-4.2.0/src/zhashx.c:708:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *handle = fopen (self->filename, "r"); data/czmq-4.2.0/src/zhashx.c:795:40: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. frame_size += 4 + strlen ((char *) values [vindex]); data/czmq-4.2.0/src/zhashx.c:818: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 (needle, item->key, length); data/czmq-4.2.0/src/zhashx.c:824: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 (needle, &serialize, 4); data/czmq-4.2.0/src/zhashx.c:826: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 (needle, values [vindex], length); data/czmq-4.2.0/src/zhashx.c:897: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 key [256]; data/czmq-4.2.0/src/zhashx.c:898: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 (key, needle, key_size); data/czmq-4.2.0/src/zhashx.c:910:21: [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 (value, needle, value_size); data/czmq-4.2.0/src/zhashx.c:1103: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 (str_item, "%d", *int_item); data/czmq-4.2.0/src/zhashx.c:1266: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 name [100]; data/czmq-4.2.0/src/zhashx.c:1278: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. item = (char *) zhashx_lookup (hash, testset [testnbr].name); data/czmq-4.2.0/src/zhashx.c:1284:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (testset [testnbr].name, "%x-%x", rand (), rand ()); data/czmq-4.2.0/src/zhashx.c:1330: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 value [255]; data/czmq-4.2.0/src/zhashx.c:1331: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 (value, "This is a string"); data/czmq-4.2.0/src/zhashx.c:1334: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 (value, "Ring a ding ding"); data/czmq-4.2.0/src/zhashx.c:1346: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 valuep [255]; data/czmq-4.2.0/src/zhashx.c:1347: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 (valuep, "This is a string"); data/czmq-4.2.0/src/zhashx.c:1350: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 (valuep, "Ring a ding ding"); data/czmq-4.2.0/src/zhashx.c:1353: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 (valuep, "Cartahena delenda est"); data/czmq-4.2.0/src/zhashx.c:1356: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 (valuep, "So say we all!"); data/czmq-4.2.0/src/zhttp_client.c:102: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 (request->response_content + offset, buffer, nmemb); data/czmq-4.2.0/src/zhttp_client.c:329: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 url[256]; data/czmq-4.2.0/src/zhttp_request.c:27: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 method[256]; data/czmq-4.2.0/src/zhttp_request.c:46: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 (self->method, "GET"); data/czmq-4.2.0/src/zhttp_server.c:271: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 (request->content + offset, upload_data, *upload_data_size); data/czmq-4.2.0/src/zhttp_server.c:488: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 url[256]; data/czmq-4.2.0/src/zhttp_server_options.c:76: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). self->port = atoi (port_str); data/czmq-4.2.0/src/ziflist.c:63: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[NI_MAXHOST]; data/czmq-4.2.0/src/zlistx.c:675: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 (needle, &serialize, 4); data/czmq-4.2.0/src/zlistx.c:677: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 (needle, item, length); data/czmq-4.2.0/src/zlistx.c:716: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 (item, needle, length); data/czmq-4.2.0/src/zmakecert.c:28: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 value [256]; data/czmq-4.2.0/src/zmsg.c:653: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 (dest, zframe_data (frame), frame_size); data/czmq-4.2.0/src/zmsg.c:662: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 (dest, zframe_data (frame), frame_size); data/czmq-4.2.0/src/zmsg.c:1035:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *file = fopen ("zmsg.test", "w"); data/czmq-4.2.0/src/zmsg.c:1041:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen ("zmsg.test", "r"); data/czmq-4.2.0/src/zmsg.c:1047:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen ("zmsg.test", "r"); data/czmq-4.2.0/src/zproc.c:991: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 cwd [PATH_MAX]; data/czmq-4.2.0/src/zproxy.c:49: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 *domain [SOCKETS]; // Auth domains for sockets data/czmq-4.2.0/src/zproxy.c:50: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 *public_key [SOCKETS]; // Public keys for sockets data/czmq-4.2.0/src/zproxy.c:51: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 *secret_key [SOCKETS]; // Secret keys for sockets data/czmq-4.2.0/src/zproxy.c:723:22: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *password = fopen (passfilepath, "w"); data/czmq-4.2.0/src/zrex.c:60: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 *hit [MAX_HITS]; // Pointers into hit_set data/czmq-4.2.0/src/zrex.c:164: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 (hit_set_ptr, self->caps [index].ptr, self->caps [index].len); data/czmq-4.2.0/src/zsock.c:562: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). int port = atoi (zrex_hit (rex, 1)); data/czmq-4.2.0/src/zsock.c:586:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int first = *first_str? atoi (first_str): DYNAMIC_FIRST; data/czmq-4.2.0/src/zsock.c:587: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). int last = *last_str? atoi (last_str): DYNAMIC_LAST; data/czmq-4.2.0/src/zsock.c:761: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 endpoint [256]; data/czmq-4.2.0/src/zsock.c:768: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 (endpoint, endpoints, delimiter - endpoints); data/czmq-4.2.0/src/zsock.c:1016:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *int_p = string? atoi (string): 0; data/czmq-4.2.0/src/zsock.c:1024:46: [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). *uint8_p = string? (uint8_t) atoi (string): 0; data/czmq-4.2.0/src/zsock.c:1032:48: [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). *uint16_p = string? (uint16_t) atol (string): 0; data/czmq-4.2.0/src/zsock.c:1077:21: [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_p, zframe_data (frame), *size); data/czmq-4.2.0/src/zsock.c:1422: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 (needle, &pointer, sizeof (void *)); data/czmq-4.2.0/src/zsock.c:1432: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 (needle, string, string_size); data/czmq-4.2.0/src/zsock.c:1442: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 (needle, string, string_size); data/czmq-4.2.0/src/zsock.c:1450: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 (needle, zchunk_data (chunk), zchunk_size (chunk)); data/czmq-4.2.0/src/zsock.c:1458: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 (needle, zuuid_data (uuid), zuuid_size (uuid)); data/czmq-4.2.0/src/zsock.c:1565: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 (pointer_p, needle, sizeof (void *)); data/czmq-4.2.0/src/zsock.c:1584: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 (*string_p, needle, string_size); data/czmq-4.2.0/src/zsock.c:1599: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 (*string_p, needle, string_size); data/czmq-4.2.0/src/zsock.c:1894: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 endpoint [40]; data/czmq-4.2.0/src/zsock.c:1895: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 (endpoint, "tcp://127.0.0.1:%d", port); data/czmq-4.2.0/src/zsp.c:75: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). quit = atoi (argv [argn + 1]) * 1000; data/czmq-4.2.0/src/zstr.c:77: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 (zmq_msg_data (&size_frame), &len, sizeof (size_t)); data/czmq-4.2.0/src/zstr.c:102: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 (zmq_msg_data (&message), string, len); data/czmq-4.2.0/src/zstr.c:143: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 (string, zmq_msg_data (&message), size); data/czmq-4.2.0/src/zstr.c:429: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 (string, zmq_msg_data (&message), size); data/czmq-4.2.0/src/zsys.c:159:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). s_io_threads = atoi (getenv ("ZSYS_IO_THREADS")); data/czmq-4.2.0/src/zsys.c:162:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). s_max_sockets = atoi (getenv ("ZSYS_MAX_SOCKETS")); data/czmq-4.2.0/src/zsys.c:165:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). s_max_msgsz = atoi (getenv ("ZSYS_MAX_MSGSZ")); data/czmq-4.2.0/src/zsys.c:168:28: [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). s_zero_copy_recv = atoi (getenv ("ZSYS_ZERO_COPY_RECV")); data/czmq-4.2.0/src/zsys.c:171:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). s_file_stable_age_msec = atoi (getenv ("ZSYS_FILE_STABLE_AGE_MSEC")); data/czmq-4.2.0/src/zsys.c:174: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). s_linger = atoi (getenv ("ZSYS_LINGER")); data/czmq-4.2.0/src/zsys.c:177: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). s_sndhwm = atoi (getenv ("ZSYS_SNDHWM")); data/czmq-4.2.0/src/zsys.c:180: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). s_rcvhwm = atoi (getenv ("ZSYS_RCVHWM")); data/czmq-4.2.0/src/zsys.c:183:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). s_pipehwm = atoi (getenv ("ZSYS_PIPEHWM")); data/czmq-4.2.0/src/zsys.c:186: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). s_ipv6 = atoi (getenv ("ZSYS_IPV6")); data/czmq-4.2.0/src/zsys.c:207:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). s_auto_use_fd = atoi (getenv ("ZSYS_AUTO_USE_FD")); data/czmq-4.2.0/src/zsys.c:258:35: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). zsys_set_thread_priority (atoi (getenv ("ZSYS_THREAD_PRIORITY"))); data/czmq-4.2.0/src/zsys.c:263:39: [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). zsys_set_thread_sched_policy (atoi (getenv ("ZSYS_THREAD_SCHED_POLICY"))); data/czmq-4.2.0/src/zsys.c:268:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). zsys_set_thread_name_prefix (atoi (getenv ("ZSYS_THREAD_NAME_PREFIX"))); data/czmq-4.2.0/src/zsys.c:516: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 endpoint [32]; data/czmq-4.2.0/src/zsys.c:518: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 (endpoint, "inproc://pipe-%04x-%04x", data/czmq-4.2.0/src/zsys.c:1122: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 [UDP_FRAME_MAX]; data/czmq-4.2.0/src/zsys.c:1152: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 ifname [IF_NAMESIZE] = {0}; data/czmq-4.2.0/src/zsys.c:1232: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 hostname [NI_MAXHOST]; data/czmq-4.2.0/src/zsys.c:1283: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). file_handle = open ("/dev/null", O_RDWR); data/czmq-4.2.0/src/zsys.c:1317: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). int handle = open (lockfile, O_RDWR | O_CREAT, 0640); data/czmq-4.2.0/src/zsys.c:1335: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 pid_buffer [32]; data/czmq-4.2.0/src/zsys.c:2076:21: [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 ((void*) key, format+pos, key_len); data/czmq-4.2.0/src/zsys.c:2296: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 date [20]; data/czmq-4.2.0/src/zsys.c:2298: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 log_text [1024]; data/czmq-4.2.0/src/zsys.c:2541: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 cwd[PATH_MAX]; data/czmq-4.2.0/src/zsys.c:2544: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 cwd[_MAX_PATH]; data/czmq-4.2.0/src/zsys.c:2546: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 cwd[1024]; data/czmq-4.2.0/src/ztrie.c:51: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 (dup, s, size); data/czmq-4.2.0/src/zuuid.c:46:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str [ZUUID_STR_LEN + 1]; // Printable UUID data/czmq-4.2.0/src/zuuid.c:86:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open ("/dev/urandom", O_RDONLY); data/czmq-4.2.0/src/zuuid.c:140: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 (self->uuid, source, ZUUID_LEN); data/czmq-4.2.0/src/zuuid.c:232: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 (self->str_canonical, self->str, 8); data/czmq-4.2.0/src/zuuid.c:234: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 (self->str_canonical + 9, self->str + 8, 4); data/czmq-4.2.0/src/zuuid.c:236: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 (self->str_canonical + 14, self->str + 12, 4); data/czmq-4.2.0/src/zuuid.c:238: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 (self->str_canonical + 19, self->str + 16, 4); data/czmq-4.2.0/src/zuuid.c:240: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 (self->str_canonical + 24, self->str + 20, 12); data/czmq-4.2.0/src/zuuid.c:257: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 (target, self->uuid, ZUUID_LEN); data/czmq-4.2.0/bindings/nodejs/binding.cc:413:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (*pad_char_utf8) != 1) data/czmq-4.2.0/bindings/nodejs/binding.cc:8274:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (*delimiter_utf8) != 1) data/czmq-4.2.0/bindings/qml/src/QmlZchunk.cpp:156:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). QmlZchunk *QmlZchunkAttached::read (FILE *handle, size_t bytes) { data/czmq-4.2.0/bindings/qml/src/QmlZchunk.h:114:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). QmlZchunk *read (FILE *handle, size_t bytes); data/czmq-4.2.0/bindings/qml/src/QmlZfile.cpp:116:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). QmlZchunk *QmlZfile::read (size_t bytes, off_t offset) { data/czmq-4.2.0/bindings/qml/src/QmlZfile.h:91:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). QmlZchunk *read (size_t bytes, off_t offset); data/czmq-4.2.0/bindings/qt/src/qzchunk.cpp:132:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). QZchunk * QZchunk::read (FILE *handle, size_t bytes) data/czmq-4.2.0/bindings/qt/src/qzchunk.h:71:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). static QZchunk * read (FILE *handle, size_t bytes); data/czmq-4.2.0/bindings/qt/src/qzfile.cpp:175:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). QZchunk * QZfile::read (size_t bytes, off_t offset) data/czmq-4.2.0/bindings/qt/src/qzfile.h:94:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). QZchunk * read (size_t bytes, off_t offset); data/czmq-4.2.0/src/zarmour.c:160: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). size_t length = strlen (data); data/czmq-4.2.0/src/zarmour.c:256: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). size_t length = strlen (data); data/czmq-4.2.0/src/zarmour.c:326: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). size_t length = strlen (data); data/czmq-4.2.0/src/zarmour.c:373: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). size_t length = strlen (data); data/czmq-4.2.0/src/zarmour.c:427:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && strlen (encoded) > self->line_length data/czmq-4.2.0/src/zarmour.c:430: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). size_t nbr_lines = strlen (encoded) / self->line_length; data/czmq-4.2.0/src/zarmour.c:432:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nbr_lines *(self->line_length + strlen (line_end)) + data/czmq-4.2.0/src/zarmour.c:433:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen (encoded) % self->line_length; data/czmq-4.2.0/src/zarmour.c:439: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). while (strlen (src) >= self->line_length) { data/czmq-4.2.0/src/zarmour.c:444: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). memcpy (dest, line_end, strlen (line_end)); data/czmq-4.2.0/src/zarmour.c:445: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). dest += strlen (line_end); data/czmq-4.2.0/src/zarmour.c:449: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). memcpy (dest, src, strlen (src)); data/czmq-4.2.0/src/zarmour.c:450: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). dest += strlen (src); data/czmq-4.2.0/src/zarmour.c:475: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). linebreakchars += strlen (line_end); data/czmq-4.2.0/src/zarmour.c:476: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). pos += strlen (line_end); data/czmq-4.2.0/src/zarmour.c:658: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). assert (zchunk_size (chunk) == strlen (expected) + 1); data/czmq-4.2.0/src/zarmour.c:670:65: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *encoded = zarmour_encode (self, (byte *) test_string, strlen (test_string)); data/czmq-4.2.0/src/zarmour.c:674:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert (strlen (encoded) == strlen (expected)); data/czmq-4.2.0/src/zarmour.c:674:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert (strlen (encoded) == strlen (expected)); data/czmq-4.2.0/src/zauth.c:330: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). const size_t name_len = strlen (name); data/czmq-4.2.0/src/zauth.c:395:81: [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). *metadata += s_add_property(*metadata, (const char *) key, val, strlen (val)); data/czmq-4.2.0/src/zbeacon.c:155:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else if (strlen (iface) == 1 && iface[0] >= '0' && iface[0] <= '9') data/czmq-4.2.0/src/zbeacon.c:196:13: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat (address_and_iface, "%"); data/czmq-4.2.0/src/zbeacon.c:291:13: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(self->hostname, "*"); data/czmq-4.2.0/src/zcert.c:264: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). if (public_text && strlen (public_text) == 40) { data/czmq-4.2.0/src/zcert.c:270: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). if (secret_text && strlen (secret_text) == 40) data/czmq-4.2.0/src/zchunk.c:461:31: [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 (zchunk_size (self) == strlen (string) data/czmq-4.2.0/src/zchunk.c:462:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && memcmp (zchunk_data (self), string, strlen (string)) == 0) data/czmq-4.2.0/src/zconfig.c:242: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). size_t length = strlen (path); data/czmq-4.2.0/src/zconfig.c:249:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (child->name) == length data/czmq-4.2.0/src/zconfig.c:356: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). size_t length = strlen (path); data/czmq-4.2.0/src/zconfig.c:363:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (child->name) == length data/czmq-4.2.0/src/zconfig.c:529:54: [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). zchunk_append ((zchunk_t *) arg, string, strlen (string)); data/czmq-4.2.0/src/zconfig.c:533: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 size = strlen (string); data/czmq-4.2.0/src/zconfig.c:687: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). size_t length = strlen (cur_line); data/czmq-4.2.0/src/zconfig.c:914:43: [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). zchunk_t *chunk = zchunk_new (string, strlen (string)); data/czmq-4.2.0/src/zconfig.c:1089:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert (strlen ((char *) zchunk_data (chunk)) == 32); data/czmq-4.2.0/src/zdir.c:119: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). self->path = (char *) zmalloc (strlen (path) + strlen (parent) + 2); data/czmq-4.2.0/src/zdir.c:119:60: [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). self->path = (char *) zmalloc (strlen (path) + strlen (parent) + 2); data/czmq-4.2.0/src/zdir.c:153: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). if (self->path [strlen (self->path) - 1] == '/') data/czmq-4.2.0/src/zdir.c:154: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). self->path [strlen (self->path) - 1] = 0; data/czmq-4.2.0/src/zdir.c:157:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *wildcard = (char *) zmalloc (strlen (self->path) + 3); data/czmq-4.2.0/src/zdir.c:177: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). size_t l = strlen (self->path); data/czmq-4.2.0/src/zdir.c:589:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *cache_file = (char *) zmalloc (strlen (self->path) + strlen ("/.cache") + 1); data/czmq-4.2.0/src/zdir.c:589:64: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *cache_file = (char *) zmalloc (strlen (self->path) + strlen ("/.cache") + 1); data/czmq-4.2.0/src/zdir_patch.c:57: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). self->vpath = (char *) zmalloc (strlen (alias) + strlen (filename) + 2); data/czmq-4.2.0/src/zdir_patch.c:57:54: [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). self->vpath = (char *) zmalloc (strlen (alias) + strlen (filename) + 2); data/czmq-4.2.0/src/zdir_patch.c:60:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (alias) && alias [strlen (alias) - 1] == '/') data/czmq-4.2.0/src/zdir_patch.c:60: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). if (strlen (alias) && alias [strlen (alias) - 1] == '/') data/czmq-4.2.0/src/zfile.c:77: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). self->fullname = (char *) zmalloc (strlen (path) + strlen (name) + 2); data/czmq-4.2.0/src/zfile.c:77:60: [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). self->fullname = (char *) zmalloc (strlen (path) + strlen (name) + 2); data/czmq-4.2.0/src/zfile.c:85:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (self->fullname) > 3 data/czmq-4.2.0/src/zfile.c:86:33: [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). && streq (self->fullname + strlen (self->fullname) - 3, ".ln")) { data/czmq-4.2.0/src/zfile.c:92: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). if (buffer [strlen (buffer) - 1] == '\n') data/czmq-4.2.0/src/zfile.c:93: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). buffer [strlen (buffer) - 1] = 0; data/czmq-4.2.0/src/zfile.c:98: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). self->fullname [strlen (self->fullname) - 3] = 0; data/czmq-4.2.0/src/zfile.c:155:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy (buffer, "/tmp/czmq_zfile.XXXXXX", sizeof(buffer)-1); data/czmq-4.2.0/src/zfile.c:234:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && strlen (self->fullname) >= strlen (path) data/czmq-4.2.0/src/zfile.c:234: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). && strlen (self->fullname) >= strlen (path) data/czmq-4.2.0/src/zfile.c:235:39: [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). && memcmp (self->fullname, path, strlen (path)) == 0) { data/czmq-4.2.0/src/zfile.c:236: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). name += strlen (path); data/czmq-4.2.0/src/zfile.c:395: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). self->fullname [strlen (self->fullname)] = '.'; data/czmq-4.2.0/src/zfile.c:548:24: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int cur_char = fgetc (self->handle); data/czmq-4.2.0/src/zframe.c:114: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). return zframe_new (string, strlen (string)); data/czmq-4.2.0/src/zframe.c:363:31: [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 (zframe_size (self) == strlen (string) data/czmq-4.2.0/src/zframe.c:364: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). && memcmp (zframe_data (self), string, strlen (string)) == 0) data/czmq-4.2.0/src/zframe.c:448:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(group) > ZMQ_GROUP_MAX_LENGTH) { data/czmq-4.2.0/src/zframe.c:531:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sprintf (buffer + strlen (buffer), "%02X", (unsigned char) data [char_nbr]); data/czmq-4.2.0/src/zframe.c:533:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sprintf (buffer + strlen (buffer), "%c", data [char_nbr]); data/czmq-4.2.0/src/zgossip_msg.c:154: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). size_t string_size = strlen (host); \ data/czmq-4.2.0/src/zgossip_msg.c:175: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). size_t string_size = strlen (host); \ data/czmq-4.2.0/src/zgossip_msg.c:363:31: [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). frame_size += 1 + strlen (self->key); data/czmq-4.2.0/src/zgossip_msg.c:366:31: [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). frame_size += strlen (self->value); data/czmq-4.2.0/src/zgossip_msg.c:545:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (self->key, value, 255); data/czmq-4.2.0/src/zhash.c:597: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). if (buffer [strlen (buffer) - 1] == '\n') data/czmq-4.2.0/src/zhash.c:598: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). buffer [strlen (buffer) - 1] = 0; data/czmq-4.2.0/src/zhash.c:678:31: [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). frame_size += 1 + strlen ((char *) item->key); data/czmq-4.2.0/src/zhash.c:680:31: [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). frame_size += 4 + strlen ((char *) item->value); data/czmq-4.2.0/src/zhash.c:698: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). size_t length = strlen ((char *) item->key); data/czmq-4.2.0/src/zhash.c:704: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). length = strlen ((char *) item->value); data/czmq-4.2.0/src/zhashx.c:720: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). if (buffer [strlen (buffer) - 1] == '\n') data/czmq-4.2.0/src/zhashx.c:721: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). buffer [strlen (buffer) - 1] = 0; data/czmq-4.2.0/src/zhashx.c:788:31: [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). frame_size += 1 + strlen ((char *) item->key); data/czmq-4.2.0/src/zhashx.c:795:31: [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). frame_size += 4 + strlen ((char *) values [vindex]); data/czmq-4.2.0/src/zhashx.c:816: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). size_t length = strlen ((char *) item->key); data/czmq-4.2.0/src/zhashx.c:822: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). length = strlen (values [vindex]); data/czmq-4.2.0/src/zhttp_client.c:221:78: [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). curl_easy_setopt (curl, CURLOPT_POSTFIELDSIZE, content ? strlen (content) : 0); data/czmq-4.2.0/src/zhttp_request.c:183: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). return strlen (self->content); data/czmq-4.2.0/src/zhttp_response.c:178: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). return strlen (self->content); data/czmq-4.2.0/src/zhttp_server.c:315: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). strlen (content), content, data/czmq-4.2.0/src/ziflist.c:81:9: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat (hbuf, "%"); data/czmq-4.2.0/src/zlistx.c:658: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). frame_size += 4 + strlen (item); data/czmq-4.2.0/src/zlistx.c:673: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). size_t length = strlen (item); data/czmq-4.2.0/src/zmakecert.c:32:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (value) && value [strlen (value) - 1] == '\n') data/czmq-4.2.0/src/zmakecert.c:32: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). if (strlen (value) && value [strlen (value) - 1] == '\n') data/czmq-4.2.0/src/zmakecert.c:33: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). value [strlen (value) - 1] = 0; data/czmq-4.2.0/src/zmsg.c:350: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 (string); data/czmq-4.2.0/src/zmsg.c:370: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 (string); data/czmq-4.2.0/src/zmsg.c:397: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 (string); data/czmq-4.2.0/src/zmsg.c:425: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 (string); data/czmq-4.2.0/src/zmsg.c:1244: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). frame = zframe_new ("Three", strlen ("Three")); data/czmq-4.2.0/src/zproc.c:94:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void *read; data/czmq-4.2.0/src/zproc.c:114:46: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). zsock_destroy ((zsock_t**)&self->read); data/czmq-4.2.0/src/zproc.c:135:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return self->read; data/czmq-4.2.0/src/zproc.c:159:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). self->read, data/czmq-4.2.0/src/zproc.c:455:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read (item->fd, buf, BUF_SIZE); data/czmq-4.2.0/src/zproc.c:1076:54: [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). zframe_t *frame = zframe_new ("Lorem ipsum\0\0", strlen ("Lorem ipsum")+2); data/czmq-4.2.0/src/zrex.c:139: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). bool matches = slre_match (&self->slre, text, strlen (text), self->caps) != 0; data/czmq-4.2.0/src/zsock.c:765: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). delimiter = endpoints + strlen (endpoints); data/czmq-4.2.0/src/zsock.c:1332:40: [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). frame_size += 1 + (string? strlen (string): 0); data/czmq-4.2.0/src/zsock.c:1337:40: [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). frame_size += 4 + (string? strlen (string): 0); data/czmq-4.2.0/src/zsock.c:1430: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). size_t string_size = strlen (string); data/czmq-4.2.0/src/zsock.c:1440: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). size_t string_size = strlen (string); data/czmq-4.2.0/src/zstr.c:50: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 (string); data/czmq-4.2.0/src/zstr.c:483:60: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert (*((size_t *)zframe_data (zmsg_first (msg))) == strlen ("loooong")); data/czmq-4.2.0/src/zsys.c:886:18: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). s_old_mask = umask (S_IWGRP | S_IWOTH | S_IRGRP | S_IROTH); data/czmq-4.2.0/src/zsys.c:901:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask (s_old_mask); data/czmq-4.2.0/src/zsys.c:1154:9: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat (peername, "%"); data/czmq-4.2.0/src/zsys.c:1279:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask (file_mask); data/czmq-4.2.0/src/zsys.c:1337:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((size_t) write (handle, pid_buffer, strlen (pid_buffer)) != strlen (pid_buffer)) { data/czmq-4.2.0/src/zsys.c:1337:73: [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 ((size_t) write (handle, pid_buffer, strlen (pid_buffer)) != strlen (pid_buffer)) { data/czmq-4.2.0/src/zsys.c:2000: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). zchunk_t *chunk = zchunk_new (NULL, strlen (format) * 1.5); data/czmq-4.2.0/src/zsys.c:2011:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (pos >= strlen (format)) data/czmq-4.2.0/src/zsys.c:2023:61: [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). zchunk_extend (chunk, (format+pos), strlen (format) - pos); data/czmq-4.2.0/src/zsys.c:2063:61: [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). zchunk_extend (chunk, (format+pos), strlen (format) - pos); data/czmq-4.2.0/src/zsys.c:2103:46: [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). zchunk_extend (chunk, v, strlen (v)); data/czmq-4.2.0/src/zsys.c:2587:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert (strlen (string) == (4 * 64 + 10)); data/czmq-4.2.0/src/ztrie.c:150:40: [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). self->path_len = parent_path_len + strlen (self->token) + 1; // +1 path delimiter data/czmq-4.2.0/src/ztrie.c:345: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 (path); data/czmq-4.2.0/src/zuuid.c:88:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t bytes_read = read (fd, uuid, ZUUID_LEN); data/czmq-4.2.0/src/zuuid.c:323:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert (strlen (zuuid_str (uuid)) == ZUUID_STR_LEN); ANALYSIS SUMMARY: Hits = 441 Lines analyzed = 79836 in approximately 1.94 seconds (41174 lines/second) Physical Source Lines of Code (SLOC) = 48114 Hits@level = [0] 225 [1] 141 [2] 203 [3] 62 [4] 35 [5] 0 Hits@level+ = [0+] 666 [1+] 441 [2+] 300 [3+] 97 [4+] 35 [5+] 0 Hits/KSLOC@level+ = [0+] 13.8421 [1+] 9.16573 [2+] 6.23519 [3+] 2.01605 [4+] 0.727439 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.