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/chiaki-1.3.0+6e055d3/cli/include/chiaki-cli.h Examining data/chiaki-1.3.0+6e055d3/cli/src/main.c Examining data/chiaki-1.3.0+6e055d3/cli/src/wakeup.c Examining data/chiaki-1.3.0+6e055d3/cli/src/discover.c Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/log.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/reorderqueue.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/fec.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/ecdh.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/streamconnection.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/regist.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/discovery.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/discoveryservice.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/audio.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/takionsendbuffer.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/random.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/time.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/frameprocessor.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/senkusha.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/rpcrypt.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/opusdecoder.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/seqnum.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/thread.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/stoppipe.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/gkcrypt.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/videoreceiver.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/http.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/feedbacksender.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/audioreceiver.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/takion.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/ctrl.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/feedback.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/video.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/controller.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/session.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/launchspec.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/sock.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/base64.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/common.h Examining data/chiaki-1.3.0+6e055d3/lib/include/chiaki/congestioncontrol.h Examining data/chiaki-1.3.0+6e055d3/lib/src/fec.c Examining data/chiaki-1.3.0+6e055d3/lib/src/rpcrypt.c Examining data/chiaki-1.3.0+6e055d3/lib/src/videoreceiver.c Examining data/chiaki-1.3.0+6e055d3/lib/src/random.c Examining data/chiaki-1.3.0+6e055d3/lib/src/launchspec.c Examining data/chiaki-1.3.0+6e055d3/lib/src/base64.c Examining data/chiaki-1.3.0+6e055d3/lib/src/log.c Examining data/chiaki-1.3.0+6e055d3/lib/src/stoppipe.c Examining data/chiaki-1.3.0+6e055d3/lib/src/takion.c Examining data/chiaki-1.3.0+6e055d3/lib/src/http.c Examining data/chiaki-1.3.0+6e055d3/lib/src/congestioncontrol.c Examining data/chiaki-1.3.0+6e055d3/lib/src/ctrl.c Examining data/chiaki-1.3.0+6e055d3/lib/src/gkcrypt.c Examining data/chiaki-1.3.0+6e055d3/lib/src/controller.c Examining data/chiaki-1.3.0+6e055d3/lib/src/frameprocessor.c Examining data/chiaki-1.3.0+6e055d3/lib/src/discoveryservice.c Examining data/chiaki-1.3.0+6e055d3/lib/src/common.c Examining data/chiaki-1.3.0+6e055d3/lib/src/ecdh.c Examining data/chiaki-1.3.0+6e055d3/lib/src/reorderqueue.c Examining data/chiaki-1.3.0+6e055d3/lib/src/thread.c Examining data/chiaki-1.3.0+6e055d3/lib/src/utils.h Examining data/chiaki-1.3.0+6e055d3/lib/src/regist.c Examining data/chiaki-1.3.0+6e055d3/lib/src/audio.c Examining data/chiaki-1.3.0+6e055d3/lib/src/senkusha.c Examining data/chiaki-1.3.0+6e055d3/lib/src/feedback.c Examining data/chiaki-1.3.0+6e055d3/lib/src/time.c Examining data/chiaki-1.3.0+6e055d3/lib/src/discovery.c Examining data/chiaki-1.3.0+6e055d3/lib/src/session.c Examining data/chiaki-1.3.0+6e055d3/lib/src/sock.c Examining data/chiaki-1.3.0+6e055d3/lib/src/streamconnection.c Examining data/chiaki-1.3.0+6e055d3/lib/src/audioreceiver.c Examining data/chiaki-1.3.0+6e055d3/lib/src/pb_utils.h Examining data/chiaki-1.3.0+6e055d3/lib/src/takionsendbuffer.c Examining data/chiaki-1.3.0+6e055d3/lib/src/opusdecoder.c Examining data/chiaki-1.3.0+6e055d3/lib/src/feedbacksender.c Examining data/chiaki-1.3.0+6e055d3/setsu/demo/main.c Examining data/chiaki-1.3.0+6e055d3/setsu/include/setsu.h Examining data/chiaki-1.3.0+6e055d3/setsu/src/setsu.c Examining data/chiaki-1.3.0+6e055d3/test/fec.c Examining data/chiaki-1.3.0+6e055d3/test/rpcrypt.c Examining data/chiaki-1.3.0+6e055d3/test/seqnum.c Examining data/chiaki-1.3.0+6e055d3/test/takion.c Examining data/chiaki-1.3.0+6e055d3/test/http.c Examining data/chiaki-1.3.0+6e055d3/test/test_log.h Examining data/chiaki-1.3.0+6e055d3/test/gkcrypt.c Examining data/chiaki-1.3.0+6e055d3/test/main.c Examining data/chiaki-1.3.0+6e055d3/test/reorderqueue.c Examining data/chiaki-1.3.0+6e055d3/test/regist.c Examining data/chiaki-1.3.0+6e055d3/test/keystate.c Examining data/chiaki-1.3.0+6e055d3/test/test_log.c Examining data/chiaki-1.3.0+6e055d3/gui/include/manualhostdialog.h Examining data/chiaki-1.3.0+6e055d3/gui/include/servericonwidget.h Examining data/chiaki-1.3.0+6e055d3/gui/include/discoverymanager.h Examining data/chiaki-1.3.0+6e055d3/gui/include/avopenglframeuploader.h Examining data/chiaki-1.3.0+6e055d3/gui/include/mainwindow.h Examining data/chiaki-1.3.0+6e055d3/gui/include/videodecoder.h Examining data/chiaki-1.3.0+6e055d3/gui/include/settingsdialog.h Examining data/chiaki-1.3.0+6e055d3/gui/include/streamsession.h Examining data/chiaki-1.3.0+6e055d3/gui/include/loginpindialog.h Examining data/chiaki-1.3.0+6e055d3/gui/include/registdialog.h Examining data/chiaki-1.3.0+6e055d3/gui/include/settingskeycapturedialog.h Examining data/chiaki-1.3.0+6e055d3/gui/include/streamwindow.h Examining data/chiaki-1.3.0+6e055d3/gui/include/serveritemwidget.h Examining data/chiaki-1.3.0+6e055d3/gui/include/sessionlog.h Examining data/chiaki-1.3.0+6e055d3/gui/include/host.h Examining data/chiaki-1.3.0+6e055d3/gui/include/exception.h Examining data/chiaki-1.3.0+6e055d3/gui/include/controllermanager.h Examining data/chiaki-1.3.0+6e055d3/gui/include/settings.h Examining data/chiaki-1.3.0+6e055d3/gui/include/dynamicgridwidget.h Examining data/chiaki-1.3.0+6e055d3/gui/include/avopenglwidget.h Examining data/chiaki-1.3.0+6e055d3/gui/src/settingsdialog.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/controllermanager.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/servericonwidget.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/mainwindow.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/streamsession.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/main.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/avopenglframeuploader.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/sessionlog.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/avopenglwidget.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/loginpindialog.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/streamwindow.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/host.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/serveritemwidget.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/videodecoder.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/settings.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/dynamicgridwidget.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/settingskeycapturedialog.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/discoverymanager.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/registdialog.cpp Examining data/chiaki-1.3.0+6e055d3/gui/src/manualhostdialog.cpp Examining data/chiaki-1.3.0+6e055d3/switch/include/io.h Examining data/chiaki-1.3.0+6e055d3/switch/include/discoverymanager.h Examining data/chiaki-1.3.0+6e055d3/switch/include/host.h Examining data/chiaki-1.3.0+6e055d3/switch/include/exception.h Examining data/chiaki-1.3.0+6e055d3/switch/include/gui.h Examining data/chiaki-1.3.0+6e055d3/switch/include/settings.h Examining data/chiaki-1.3.0+6e055d3/switch/src/gui.cpp Examining data/chiaki-1.3.0+6e055d3/switch/src/main.cpp Examining data/chiaki-1.3.0+6e055d3/switch/src/io.cpp Examining data/chiaki-1.3.0+6e055d3/switch/src/host.cpp Examining data/chiaki-1.3.0+6e055d3/switch/src/settings.cpp Examining data/chiaki-1.3.0+6e055d3/switch/src/discoverymanager.cpp Examining data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/log.h Examining data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/video-decoder.h Examining data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/log.c Examining data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/audio-decoder.h Examining data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/chiaki-jni.h Examining data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/circular-fifo.hpp Examining data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/audio-output.h Examining data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/audio-decoder.c Examining data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/video-decoder.c Examining data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/circular-buf.hpp Examining data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/chiaki-jni.c Examining data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/audio-output.cpp FINAL RESULTS: data/chiaki-1.3.0+6e055d3/lib/include/chiaki/regist.h:83:163: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. CHIAKI_EXPORT ChiakiErrorCode chiaki_regist_request_payload_format(ChiakiTarget target, const uint8_t *ambassador, uint8_t *buf, size_t *buf_size, ChiakiRPCrypt *crypt, const char *psn_online_id, const uint8_t *psn_account_id, uint32_t pin); data/chiaki-1.3.0+6e055d3/lib/src/ctrl.c:674:20: [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. int request_len = snprintf(buf, sizeof(buf), request_fmt, data/chiaki-1.3.0+6e055d3/lib/src/launchspec.c:71: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. int written = snprintf(buf, buf_size, launchspec_fmt, data/chiaki-1.3.0+6e055d3/lib/src/log.c:73: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. int written = vsnprintf(buf, sizeof(buf), fmt, args); data/chiaki-1.3.0+6e055d3/lib/src/log.c:86: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. written = vsnprintf(msg, written + 1, fmt, args); data/chiaki-1.3.0+6e055d3/lib/src/regist.c:122:12: [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. int cur = snprintf(buf, buf_size, request_head_fmt, data/chiaki-1.3.0+6e055d3/lib/src/regist.c:131:11: [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. int r = snprintf(buf + cur, s, request_rp_version_fmt, rp_version_str); data/chiaki-1.3.0+6e055d3/lib/src/regist.c:145:163: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. CHIAKI_EXPORT ChiakiErrorCode chiaki_regist_request_payload_format(ChiakiTarget target, const uint8_t *ambassador, uint8_t *buf, size_t *buf_size, ChiakiRPCrypt *crypt, const char *psn_online_id, const uint8_t *psn_account_id, uint32_t pin) data/chiaki-1.3.0+6e055d3/lib/src/regist.c:155:40: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. chiaki_rpcrypt_init_regist_ps4_pre10(crypt, ambassador, pin); data/chiaki-1.3.0+6e055d3/lib/src/regist.c:162:30: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. chiaki_rpcrypt_init_regist(crypt, ambassador, key_0_off, pin); data/chiaki-1.3.0+6e055d3/lib/src/regist.c:172:23: [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. inner_header_size = snprintf((char *)buf + inner_header_off, buf_size_val - inner_header_off, request_inner_online_id_fmt, psn_online_id); data/chiaki-1.3.0+6e055d3/lib/src/regist.c:179:23: [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. inner_header_size = snprintf((char *)buf + inner_header_off, buf_size_val - inner_header_off, data/chiaki-1.3.0+6e055d3/lib/src/regist.c:188:47: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. ChiakiErrorCode err = chiaki_rpcrypt_encrypt(crypt, 0, buf + inner_header_off, buf + inner_header_off, inner_header_size); data/chiaki-1.3.0+6e055d3/lib/src/regist.c:200:16: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. ChiakiRPCrypt crypt; data/chiaki-1.3.0+6e055d3/lib/src/regist.c:211:103: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. err = chiaki_regist_request_payload_format(regist->info.target, ambassador, payload, &payload_size, &crypt, regist->info.psn_online_id, regist->info.psn_account_id, regist->info.pin); data/chiaki-1.3.0+6e055d3/lib/src/regist.c:292:51: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. err = regist_recv_response(regist, &host, sock, &crypt); data/chiaki-1.3.0+6e055d3/lib/src/session.c:716:20: [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. int request_len = snprintf(buf, sizeof(buf), session_request_fmt, data/chiaki-1.3.0+6e055d3/lib/src/takion.c:341:64: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. static ChiakiErrorCode chiaki_takion_packet_mac(ChiakiGKCrypt *crypt, uint8_t *buf, size_t buf_size, uint8_t *mac_out, uint8_t *mac_old_out, ChiakiTakionPacketKeyPos *key_pos_out) data/chiaki-1.3.0+6e055d3/lib/src/takion.c:362:5: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. if(crypt) data/chiaki-1.3.0+6e055d3/lib/src/takion.c:366:23: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. chiaki_gkcrypt_gmac(crypt, key_pos, buf, buf_size, buf + mac_offset); data/chiaki-1.3.0+6e055d3/setsu/demo/main.c:29:36: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define LOG(...) do { if(log_mode) fprintf(stderr, __VA_ARGS__); } while(0) data/chiaki-1.3.0+6e055d3/setsu/src/setsu.c:20:24: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define SETSU_LOG(...) fprintf(stderr, __VA_ARGS__) data/chiaki-1.3.0+6e055d3/lib/src/common.c:90:2: [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. srand(seed); // doesn't necessarily need to be secure for crypto data/chiaki-1.3.0+6e055d3/lib/src/thread.c:103:2: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&mutex->cs); data/chiaki-1.3.0+6e055d3/lib/src/thread.c:138:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&mutex->cs); data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/audio-decoder.c:135:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(opus_id_head, "OpusHead", 8); data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/audio-decoder.c:197:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(codec_buf, buf, codec_sample_size); data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/chiaki-jni.c:65:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sig + 1, id, idlen); data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/circular-buf.hpp:86: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(push_chunk + push_chunk_size, buf + pushed, to_push); data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/circular-buf.hpp:121: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(buf + popped, pop_chunk + (ChunkSize - pop_chunk_size), to_pop); data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/log.c:78:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(file, "w+"); data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/video-decoder.c:151:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(codec_buf, buf, codec_sample_size); data/chiaki-1.3.0+6e055d3/cli/src/discover.c:135:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(host_addr, ai->ai_addr, host_addr_len); data/chiaki-1.3.0+6e055d3/gui/include/host.h:47:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rp_regist_key[CHIAKI_SESSION_AUTH_SIZE]; data/chiaki-1.3.0+6e055d3/gui/src/avopenglwidget.cpp:223:4: [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(buf, frame->data[i], size); data/chiaki-1.3.0+6e055d3/gui/src/avopenglwidget.cpp:227: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(buf + width * l * conversion_config->plane_configs[i].data_per_pixel, frame->data[i] + frame->linesize[i] * l, width * conversion_config->plane_configs[i].data_per_pixel); data/chiaki-1.3.0+6e055d3/gui/src/registdialog.cpp:138:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(info.psn_account_id, account_id.constData(), CHIAKI_PSN_ACCOUNT_ID_SIZE); data/chiaki-1.3.0+6e055d3/gui/src/sessionlog.cpp:30:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(!file->open(QIODevice::ReadWrite)) data/chiaki-1.3.0+6e055d3/gui/src/videodecoder.cpp:104: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 errbuf[128]; data/chiaki-1.3.0+6e055d3/lib/include/chiaki/regist.h:40:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ap_ssid[0x30]; data/chiaki-1.3.0+6e055d3/lib/include/chiaki/regist.h:41:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ap_bssid[0x20]; data/chiaki-1.3.0+6e055d3/lib/include/chiaki/regist.h:42:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ap_key[0x50]; data/chiaki-1.3.0+6e055d3/lib/include/chiaki/regist.h:43:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ap_name[0x20]; data/chiaki-1.3.0+6e055d3/lib/include/chiaki/regist.h:45:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ps4_nickname[0x20]; data/chiaki-1.3.0+6e055d3/lib/include/chiaki/regist.h:46:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rp_regist_key[CHIAKI_SESSION_AUTH_SIZE]; // must be completely filled (pad with \0) data/chiaki-1.3.0+6e055d3/lib/include/chiaki/session.h:76:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char regist_key[CHIAKI_SESSION_AUTH_SIZE]; // must be completely filled (pad with \0) data/chiaki-1.3.0+6e055d3/lib/include/chiaki/session.h:146:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostname[128]; data/chiaki-1.3.0+6e055d3/lib/include/chiaki/session.h:147:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char regist_key[CHIAKI_RPCRYPT_KEY_SIZE]; data/chiaki-1.3.0+6e055d3/lib/include/chiaki/session.h:157:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char session_id[CHIAKI_SESSION_ID_SIZE_MAX]; // zero-terminated data/chiaki-1.3.0+6e055d3/lib/src/ctrl.c:168:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, pin, pin_size); data/chiaki-1.3.0+6e055d3/lib/src/ctrl.c:442:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ctrl->session->session_id, payload, payload_size); data/chiaki-1.3.0+6e055d3/lib/src/ctrl.c:557:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sa, addr->ai_addr, addr->ai_addrlen); data/chiaki-1.3.0+6e055d3/lib/src/ctrl.c:611:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char auth_b64[CHIAKI_RPCRYPT_KEY_SIZE*2]; data/chiaki-1.3.0+6e055d3/lib/src/ctrl.c:620:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char did_b64[CHIAKI_RP_DID_SIZE*2]; data/chiaki-1.3.0+6e055d3/lib/src/ctrl.c:632:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ostype_b64[256]; data/chiaki-1.3.0+6e055d3/lib/src/ctrl.c:637:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bitrate_b64[256]; data/chiaki-1.3.0+6e055d3/lib/src/ctrl.c:673:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/chiaki-1.3.0+6e055d3/lib/src/ctrl.c:768:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ctrl->recv_buf, buf + header_size, ctrl->recv_buf_size); data/chiaki-1.3.0+6e055d3/lib/src/discovery.c:175:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/chiaki-1.3.0+6e055d3/lib/src/discovery.c:246:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/chiaki-1.3.0+6e055d3/lib/src/discovery.c:267:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char addr_buf[64]; data/chiaki-1.3.0+6e055d3/lib/src/discovery.c:302:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&addr, ai->ai_addr, ai->ai_addrlen); data/chiaki-1.3.0+6e055d3/lib/src/discoveryservice.c:44:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(service->options.send_addr, options->send_addr, service->options.send_addr_size); data/chiaki-1.3.0+6e055d3/lib/src/fec.c:32:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(jerasures, erasures, erasures_count * sizeof(int)); data/chiaki-1.3.0+6e055d3/lib/src/feedback.c:144:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + written, event->buf, event->len); data/chiaki-1.3.0+6e055d3/lib/src/frameprocessor.c:154:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(frame_processor->frame_buf + packet->unit_index * frame_processor->buf_stride_per_unit, data/chiaki-1.3.0+6e055d3/lib/src/gkcrypt.c:120:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data + 3, handshake_key, CHIAKI_HANDSHAKE_KEY_SIZE); data/chiaki-1.3.0+6e055d3/lib/src/gkcrypt.c:159:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(gkcrypt->key_base, hmac, CHIAKI_GKCRYPT_BLOCK_SIZE); data/chiaki-1.3.0+6e055d3/lib/src/gkcrypt.c:160:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(gkcrypt->iv, hmac + CHIAKI_GKCRYPT_BLOCK_SIZE, CHIAKI_GKCRYPT_BLOCK_SIZE); data/chiaki-1.3.0+6e055d3/lib/src/gkcrypt.c:177:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out + i, base + i, CHIAKI_GKCRYPT_BLOCK_SIZE - i); data/chiaki-1.3.0+6e055d3/lib/src/gkcrypt.c:183:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data, key_base, 0x10); data/chiaki-1.3.0+6e055d3/lib/src/gkcrypt.c:195:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(key_out, md, CHIAKI_GKCRYPT_BLOCK_SIZE); data/chiaki-1.3.0+6e055d3/lib/src/gkcrypt.c:210:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(key_out, gkcrypt->key_gmac_base, sizeof(gkcrypt->key_gmac_base)); data/chiaki-1.3.0+6e055d3/lib/src/gkcrypt.c:306:4: [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(buf, gkcrypt->key_buf + offset_in_buf, buf_size - excess); data/chiaki-1.3.0+6e055d3/lib/src/gkcrypt.c:307:4: [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(buf + (buf_size - excess), gkcrypt->key_buf, excess); data/chiaki-1.3.0+6e055d3/lib/src/gkcrypt.c:310:4: [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(buf, gkcrypt->key_buf + offset_in_buf, buf_size); data/chiaki-1.3.0+6e055d3/lib/src/launchspec.c:66:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char handshake_key_b64[CHIAKI_HANDSHAKE_KEY_SIZE * 2]; data/chiaki-1.3.0+6e055d3/lib/src/log.c:69:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[0x100]; data/chiaki-1.3.0+6e055d3/lib/src/log.c:117:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hex_buf[HEXDUMP_WIDTH * 3 + 1]; data/chiaki-1.3.0+6e055d3/lib/src/log.c:118:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ascii_buf[HEXDUMP_WIDTH + 1]; data/chiaki-1.3.0+6e055d3/lib/src/regist.c:139:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + cur, request_tail, tail_size); data/chiaki-1.3.0+6e055d3/lib/src/regist.c:165:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + 0xc7, aeropause + 8, 8); data/chiaki-1.3.0+6e055d3/lib/src/regist.c:166:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + 0x191, aeropause, 8); data/chiaki-1.3.0+6e055d3/lib/src/regist.c:175:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char account_id_b64[CHIAKI_PSN_ACCOUNT_ID_SIZE * 2]; data/chiaki-1.3.0+6e055d3/lib/src/regist.c:218:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char request_header[0x100]; data/chiaki-1.3.0+6e055d3/lib/src/regist.c:387:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char addr[64]; data/chiaki-1.3.0+6e055d3/lib/src/regist.c:412:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(send_addr, ai->ai_addr, ai->ai_addrlen); data/chiaki-1.3.0+6e055d3/lib/src/regist.c:625:4: [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->name, header->value, len); \ data/chiaki-1.3.0+6e055d3/lib/src/rpcrypt.c:996:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, rpcrypt->ambassador, CHIAKI_RPCRYPT_KEY_SIZE); data/chiaki-1.3.0+6e055d3/lib/src/rpcrypt.c:1025:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(iv, hmac, CHIAKI_RPCRYPT_KEY_SIZE); data/chiaki-1.3.0+6e055d3/lib/src/rpcrypt.c:1082:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, rpcrypt->ambassador, CHIAKI_RPCRYPT_KEY_SIZE); data/chiaki-1.3.0+6e055d3/lib/src/rpcrypt.c:1101:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(iv, hmac, CHIAKI_RPCRYPT_KEY_SIZE); data/chiaki-1.3.0+6e055d3/lib/src/senkusha.c:137:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(takion_info.sa, session->connect_info.host_addrinfo_selected->ai_addr, takion_info.sa_len); data/chiaki-1.3.0+6e055d3/lib/src/session.c:213:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(session->connect_info.did, did_prefix, sizeof(did_prefix)); data/chiaki-1.3.0+6e055d3/lib/src/session.c:215:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(session->connect_info.did + sizeof(session->connect_info.did) - sizeof(did_suffix), did_suffix, sizeof(did_suffix)); data/chiaki-1.3.0+6e055d3/lib/src/session.c:292:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, pin, pin_size); data/chiaki-1.3.0+6e055d3/lib/src/session.c:604:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sa, ai->ai_addr, ai->ai_addrlen); data/chiaki-1.3.0+6e055d3/lib/src/session.c:704:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char regist_key_hex[sizeof(session->connect_info.regist_key) * 2 + 1]; data/chiaki-1.3.0+6e055d3/lib/src/session.c:715:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/chiaki-1.3.0+6e055d3/lib/src/streamconnection.c:128:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(takion_info.sa, session->connect_info.host_addrinfo_selected->ai_addr, takion_info.sa_len); data/chiaki-1.3.0+6e055d3/lib/src/streamconnection.c:349:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char reason[256]; data/chiaki-1.3.0+6e055d3/lib/src/streamconnection.c:422:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ecdh_pub_key[128]; data/chiaki-1.3.0+6e055d3/lib/src/streamconnection.c:424:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ecdh_sig[32]; data/chiaki-1.3.0+6e055d3/lib/src/streamconnection.c:663:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char json[LAUNCH_SPEC_JSON_BUF_SIZE]; data/chiaki-1.3.0+6e055d3/lib/src/streamconnection.c:664:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b64[LAUNCH_SPEC_JSON_BUF_SIZE * 2]; data/chiaki-1.3.0+6e055d3/lib/src/takion.c:356:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(mac_old_out, buf + mac_offset, CHIAKI_GKCRYPT_GMAC_SIZE); data/chiaki-1.3.0+6e055d3/lib/src/takion.c:373:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(mac_out, buf + mac_offset, CHIAKI_GKCRYPT_GMAC_SIZE); data/chiaki-1.3.0+6e055d3/lib/src/takion.c:425:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(msg_payload + 9, buf, buf_size); data/chiaki-1.3.0+6e055d3/lib/src/takion.c:543:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + 0xc, payload, payload_size); data/chiaki-1.3.0+6e055d3/lib/src/takion.c:1087:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(message + 1 + TAKION_MESSAGE_HEADER_SIZE, cookie, TAKION_COOKIE_SIZE); data/chiaki-1.3.0+6e055d3/lib/src/takion.c:1135:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(payload->cookie, pl + 0x10, TAKION_COOKIE_SIZE); data/chiaki-1.3.0+6e055d3/lib/src/thread.c:80:12: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0); data/chiaki-1.3.0+6e055d3/lib/src/thread.c:84:2: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_UTF8, 0, name, -1, wstr, len); data/chiaki-1.3.0+6e055d3/lib/src/utils.h:78:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char addr_buf[64]; data/chiaki-1.3.0+6e055d3/lib/src/videoreceiver.c:39:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(video_receiver->profiles, profiles, profiles_count * sizeof(ChiakiVideoProfile)); data/chiaki-1.3.0+6e055d3/setsu/demo/main.c:38:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[(1 + WIDTH/SCALE)*(HEIGHT/SCALE) + 1]; data/chiaki-1.3.0+6e055d3/setsu/src/setsu.c:256:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(path, O_RDONLY | O_NONBLOCK); data/chiaki-1.3.0+6e055d3/setsu/src/setsu.c:284:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). dev->fd = open(dev->path, O_RDONLY | O_NONBLOCK); data/chiaki-1.3.0+6e055d3/setsu/src/setsu.c:441:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/chiaki-1.3.0+6e055d3/switch/include/host.h:65:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rp_regist_key[CHIAKI_SESSION_AUTH_SIZE] = {0}; data/chiaki-1.3.0+6e055d3/switch/src/discoverymanager.cpp:151:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(this->host_addr, ai->ai_addr, this->host_addr_len); data/chiaki-1.3.0+6e055d3/switch/src/discoverymanager.cpp:173:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(this->host_addr, &addr, this->host_addr_len); data/chiaki-1.3.0+6e055d3/switch/src/discoverymanager.cpp:205:26: [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). host->system_version = atoi(discovered_host->system_version); data/chiaki-1.3.0+6e055d3/switch/src/discoverymanager.cpp:211:45: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). host->device_discovery_protocol_version = atoi(discovered_host->device_discovery_protocol_version); data/chiaki-1.3.0+6e055d3/switch/src/gui.cpp:20: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). d_##dialog->open(); \ data/chiaki-1.3.0+6e055d3/switch/src/gui.cpp:64:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin_input[9] = {0}; data/chiaki-1.3.0+6e055d3/switch/src/gui.cpp:96:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). peprpc->open(); data/chiaki-1.3.0+6e055d3/switch/src/gui.cpp:316:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char online_id[256] = {0}; data/chiaki-1.3.0+6e055d3/switch/src/gui.cpp:336:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char account_id[CHIAKI_PSN_ACCOUNT_ID_SIZE * 2] = {0}; data/chiaki-1.3.0+6e055d3/switch/src/host.cpp:123:26: [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). this->regist_info.pin = atoi(pin.c_str()); data/chiaki-1.3.0+6e055d3/switch/src/host.cpp:226: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( &(this->ps4_mac), &(r_host->ps4_mac), sizeof(this->ps4_mac) ); data/chiaki-1.3.0+6e055d3/switch/src/host.cpp:228: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( &(this->rp_regist_key), &(r_host->rp_regist_key), sizeof(this->rp_regist_key) ); data/chiaki-1.3.0+6e055d3/switch/src/host.cpp:230: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( &(this->rp_key), &(r_host->rp_key), sizeof(this->rp_key) ); data/chiaki-1.3.0+6e055d3/switch/src/io.cpp:185:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errbuf[128]; data/chiaki-1.3.0+6e055d3/switch/src/io.cpp:644:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/chiaki-1.3.0+6e055d3/switch/src/io.cpp:691:4: [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(buf, frame->data[i], size); data/chiaki-1.3.0+6e055d3/switch/src/io.cpp:697: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(buf + width * l * planes[i][2], data/chiaki-1.3.0+6e055d3/switch/src/settings.cpp:257:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int v = atoi(value.c_str()); data/chiaki-1.3.0+6e055d3/switch/src/settings.cpp:295: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). host->rp_key_type = std::atoi(value.c_str()); data/chiaki-1.3.0+6e055d3/switch/src/settings.cpp:308:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rp_key_b64[rp_key_b64_sz + 1] = {0}; data/chiaki-1.3.0+6e055d3/switch/src/settings.cpp:333:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rp_regist_key_b64[rp_regist_key_b64_sz + 1] = {0}; data/chiaki-1.3.0+6e055d3/switch/src/settings.cpp:393:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). config_file.open(this->filename, std::fstream::in); data/chiaki-1.3.0+6e055d3/switch/src/settings.cpp:476: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). config_file.open(this->filename, std::fstream::out | std::ofstream::trunc); data/chiaki-1.3.0+6e055d3/switch/src/settings.cpp:533: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 rp_key_type[33] = { 0 }; data/chiaki-1.3.0+6e055d3/test/fec.c:35:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(frame_buffer + i * stride, frame_buffer_ref + i * test_case->unit_size, test_case->unit_size); data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/chiaki-jni.c:60: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). size_t idlen = strlen(id); data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/chiaki-jni.c:380:72: [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). chiaki_session_set_login_pin(&session->session, (const uint8_t *)pin, strlen(pin)); data/chiaki-1.3.0+6e055d3/android/app/src/main/cpp/log.c:69: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). fwrite(msg, strlen(msg), 1, f); data/chiaki-1.3.0+6e055d3/cli/src/main.c:53: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). size_t l = strlen(state->name) + strlen(name) + 2; data/chiaki-1.3.0+6e055d3/cli/src/main.c:53:35: [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(state->name) + strlen(name) + 2; data/chiaki-1.3.0+6e055d3/cli/src/wakeup.c:68:5: [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(arguments.registkey) > 8) data/chiaki-1.3.0+6e055d3/lib/src/ctrl.c:538: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). chiaki_base64_decode(header->value, strlen(header->value) + 1, response->rp_server_type, &server_type_size); data/chiaki-1.3.0+6e055d3/lib/src/ctrl.c:626:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t ostype_len = strlen(SESSION_OSTYPE) + 1; data/chiaki-1.3.0+6e055d3/lib/src/pb_utils.h:16: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). return pb_encode_string(stream, (uint8_t*)str, strlen(str)); data/chiaki-1.3.0+6e055d3/lib/src/regist.c:136: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 tail_size = strlen(request_tail) + 1; data/chiaki-1.3.0+6e055d3/lib/src/regist.c:619: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). size_t len = strlen(header->value); \ data/chiaki-1.3.0+6e055d3/lib/src/regist.c:640: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). err = parse_hex((uint8_t *)host->rp_regist_key, &buf_size, header->value, strlen(header->value)); data/chiaki-1.3.0+6e055d3/lib/src/regist.c:658:71: [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). err = parse_hex((uint8_t *)host->rp_key, &buf_size, header->value, strlen(header->value)); data/chiaki-1.3.0+6e055d3/lib/src/regist.c:672:72: [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). err = parse_hex((uint8_t *)host->ps4_mac, &buf_size, header->value, strlen(header->value)); data/chiaki-1.3.0+6e055d3/lib/src/session.c:776: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). err = chiaki_base64_decode(response.nonce, strlen(response.nonce), session->nonce, &nonce_len); data/chiaki-1.3.0+6e055d3/lib/src/stoppipe.c:251:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((r = read(stop_pipe->fd, &v, sizeof(v))) > 0); data/chiaki-1.3.0+6e055d3/lib/src/stoppipe.c:256:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((r = read(stop_pipe->fds[0], &v, sizeof(v))) > 0); data/chiaki-1.3.0+6e055d3/switch/src/host.cpp:53:5: [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(this->rp_regist_key) > 8) data/chiaki-1.3.0+6e055d3/switch/src/host.cpp:58:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else if (strlen(this->rp_regist_key) <=0) data/chiaki-1.3.0+6e055d3/test/fec.c:21: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 b64len = strlen(test_case->frame_buffer_b64); data/chiaki-1.3.0+6e055d3/test/http.c:38:74: [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). ChiakiErrorCode err = chiaki_http_response_parse(&parsed_response, buf, strlen(buf)); ANALYSIS SUMMARY: Hits = 166 Lines analyzed = 26222 in approximately 0.72 seconds (36252 lines/second) Physical Source Lines of Code (SLOC) = 20969 Hits@level = [0] 29 [1] 21 [2] 120 [3] 3 [4] 22 [5] 0 Hits@level+ = [0+] 195 [1+] 166 [2+] 145 [3+] 25 [4+] 22 [5+] 0 Hits/KSLOC@level+ = [0+] 9.29944 [1+] 7.91645 [2+] 6.91497 [3+] 1.19224 [4+] 1.04917 [5+] 0 Dot directories skipped = 3 (--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.