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/libqmatrixclient-0.5.3.2/examples/qmc-example.cpp Examining data/libqmatrixclient-0.5.3.2/lib/application-service/definitions/location.cpp Examining data/libqmatrixclient-0.5.3.2/lib/application-service/definitions/location.h Examining data/libqmatrixclient-0.5.3.2/lib/application-service/definitions/protocol.cpp Examining data/libqmatrixclient-0.5.3.2/lib/application-service/definitions/protocol.h Examining data/libqmatrixclient-0.5.3.2/lib/application-service/definitions/user.cpp Examining data/libqmatrixclient-0.5.3.2/lib/application-service/definitions/user.h Examining data/libqmatrixclient-0.5.3.2/lib/avatar.cpp Examining data/libqmatrixclient-0.5.3.2/lib/avatar.h Examining data/libqmatrixclient-0.5.3.2/lib/connection.cpp Examining data/libqmatrixclient-0.5.3.2/lib/connection.h Examining data/libqmatrixclient-0.5.3.2/lib/connectiondata.cpp Examining data/libqmatrixclient-0.5.3.2/lib/connectiondata.h Examining data/libqmatrixclient-0.5.3.2/lib/converters.cpp Examining data/libqmatrixclient-0.5.3.2/lib/converters.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/account-data.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/account-data.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/admin.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/admin.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/administrative_contact.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/administrative_contact.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/appservice_room_directory.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/appservice_room_directory.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/banning.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/banning.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/capabilities.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/capabilities.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/content-repo.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/content-repo.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/create_room.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/create_room.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/auth_data.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/auth_data.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/client_device.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/client_device.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/device_keys.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/device_keys.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/event_filter.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/event_filter.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/public_rooms_response.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/public_rooms_response.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/push_condition.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/push_condition.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/push_rule.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/push_rule.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/push_ruleset.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/push_ruleset.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/room_event_filter.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/room_event_filter.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/sync_filter.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/sync_filter.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/user_identifier.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/user_identifier.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/wellknown/full.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/wellknown/full.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/wellknown/homeserver.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/wellknown/homeserver.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/wellknown/identity_server.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/definitions/wellknown/identity_server.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/device_management.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/device_management.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/directory.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/directory.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/event_context.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/event_context.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/filter.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/filter.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/inviting.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/inviting.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/joining.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/joining.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/keys.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/keys.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/kicking.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/kicking.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/leaving.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/leaving.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/list_joined_rooms.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/list_joined_rooms.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/list_public_rooms.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/list_public_rooms.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/login.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/login.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/logout.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/logout.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/message_pagination.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/message_pagination.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/notifications.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/notifications.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/openid.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/openid.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/peeking_events.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/peeking_events.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/presence.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/presence.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/profile.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/profile.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/pusher.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/pusher.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/pushrules.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/pushrules.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/read_markers.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/read_markers.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/receipts.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/receipts.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/redaction.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/redaction.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/registration.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/registration.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/report_content.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/report_content.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/room_send.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/room_send.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/room_state.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/room_state.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/room_upgrades.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/room_upgrades.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/rooms.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/rooms.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/search.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/search.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/sso_login_redirect.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/sso_login_redirect.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/tags.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/tags.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/third_party_lookup.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/third_party_lookup.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/third_party_membership.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/third_party_membership.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/to_device.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/to_device.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/typing.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/typing.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/users.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/users.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/versions.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/versions.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/voip.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/voip.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/wellknown.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/wellknown.h Examining data/libqmatrixclient-0.5.3.2/lib/csapi/whoami.cpp Examining data/libqmatrixclient-0.5.3.2/lib/csapi/whoami.h Examining data/libqmatrixclient-0.5.3.2/lib/eventitem.cpp Examining data/libqmatrixclient-0.5.3.2/lib/eventitem.h Examining data/libqmatrixclient-0.5.3.2/lib/events/accountdataevents.h Examining data/libqmatrixclient-0.5.3.2/lib/events/callanswerevent.cpp Examining data/libqmatrixclient-0.5.3.2/lib/events/callanswerevent.h Examining data/libqmatrixclient-0.5.3.2/lib/events/callcandidatesevent.cpp Examining data/libqmatrixclient-0.5.3.2/lib/events/callcandidatesevent.h Examining data/libqmatrixclient-0.5.3.2/lib/events/callhangupevent.cpp Examining data/libqmatrixclient-0.5.3.2/lib/events/callhangupevent.h Examining data/libqmatrixclient-0.5.3.2/lib/events/callinviteevent.cpp Examining data/libqmatrixclient-0.5.3.2/lib/events/callinviteevent.h Examining data/libqmatrixclient-0.5.3.2/lib/events/directchatevent.cpp Examining data/libqmatrixclient-0.5.3.2/lib/events/directchatevent.h Examining data/libqmatrixclient-0.5.3.2/lib/events/event.cpp Examining data/libqmatrixclient-0.5.3.2/lib/events/event.h Examining data/libqmatrixclient-0.5.3.2/lib/events/eventcontent.cpp Examining data/libqmatrixclient-0.5.3.2/lib/events/eventcontent.h Examining data/libqmatrixclient-0.5.3.2/lib/events/eventloader.h Examining data/libqmatrixclient-0.5.3.2/lib/events/reactionevent.cpp Examining data/libqmatrixclient-0.5.3.2/lib/events/reactionevent.h Examining data/libqmatrixclient-0.5.3.2/lib/events/receiptevent.cpp Examining data/libqmatrixclient-0.5.3.2/lib/events/receiptevent.h Examining data/libqmatrixclient-0.5.3.2/lib/events/redactionevent.cpp Examining data/libqmatrixclient-0.5.3.2/lib/events/redactionevent.h Examining data/libqmatrixclient-0.5.3.2/lib/events/roomavatarevent.h Examining data/libqmatrixclient-0.5.3.2/lib/events/roomcreateevent.cpp Examining data/libqmatrixclient-0.5.3.2/lib/events/roomcreateevent.h Examining data/libqmatrixclient-0.5.3.2/lib/events/roomevent.cpp Examining data/libqmatrixclient-0.5.3.2/lib/events/roomevent.h Examining data/libqmatrixclient-0.5.3.2/lib/events/roommemberevent.cpp Examining data/libqmatrixclient-0.5.3.2/lib/events/roommemberevent.h Examining data/libqmatrixclient-0.5.3.2/lib/events/roommessageevent.cpp Examining data/libqmatrixclient-0.5.3.2/lib/events/roommessageevent.h Examining data/libqmatrixclient-0.5.3.2/lib/events/roomtombstoneevent.cpp Examining data/libqmatrixclient-0.5.3.2/lib/events/roomtombstoneevent.h Examining data/libqmatrixclient-0.5.3.2/lib/events/simplestateevents.h Examining data/libqmatrixclient-0.5.3.2/lib/events/stateevent.cpp Examining data/libqmatrixclient-0.5.3.2/lib/events/stateevent.h Examining data/libqmatrixclient-0.5.3.2/lib/events/typingevent.cpp Examining data/libqmatrixclient-0.5.3.2/lib/events/typingevent.h Examining data/libqmatrixclient-0.5.3.2/lib/identity/definitions/request_email_validation.cpp Examining data/libqmatrixclient-0.5.3.2/lib/identity/definitions/request_email_validation.h Examining data/libqmatrixclient-0.5.3.2/lib/identity/definitions/request_msisdn_validation.cpp Examining data/libqmatrixclient-0.5.3.2/lib/identity/definitions/request_msisdn_validation.h Examining data/libqmatrixclient-0.5.3.2/lib/identity/definitions/sid.cpp Examining data/libqmatrixclient-0.5.3.2/lib/identity/definitions/sid.h Examining data/libqmatrixclient-0.5.3.2/lib/jobs/basejob.cpp Examining data/libqmatrixclient-0.5.3.2/lib/jobs/basejob.h Examining data/libqmatrixclient-0.5.3.2/lib/jobs/downloadfilejob.cpp Examining data/libqmatrixclient-0.5.3.2/lib/jobs/downloadfilejob.h Examining data/libqmatrixclient-0.5.3.2/lib/jobs/mediathumbnailjob.cpp Examining data/libqmatrixclient-0.5.3.2/lib/jobs/mediathumbnailjob.h Examining data/libqmatrixclient-0.5.3.2/lib/jobs/postreadmarkersjob.h Examining data/libqmatrixclient-0.5.3.2/lib/jobs/requestdata.cpp Examining data/libqmatrixclient-0.5.3.2/lib/jobs/requestdata.h Examining data/libqmatrixclient-0.5.3.2/lib/jobs/syncjob.cpp Examining data/libqmatrixclient-0.5.3.2/lib/jobs/syncjob.h Examining data/libqmatrixclient-0.5.3.2/lib/joinstate.h Examining data/libqmatrixclient-0.5.3.2/lib/logging.cpp Examining data/libqmatrixclient-0.5.3.2/lib/logging.h Examining data/libqmatrixclient-0.5.3.2/lib/networkaccessmanager.cpp Examining data/libqmatrixclient-0.5.3.2/lib/networkaccessmanager.h Examining data/libqmatrixclient-0.5.3.2/lib/networksettings.cpp Examining data/libqmatrixclient-0.5.3.2/lib/networksettings.h Examining data/libqmatrixclient-0.5.3.2/lib/qt_connection_util.h Examining data/libqmatrixclient-0.5.3.2/lib/room.cpp Examining data/libqmatrixclient-0.5.3.2/lib/room.h Examining data/libqmatrixclient-0.5.3.2/lib/settings.cpp Examining data/libqmatrixclient-0.5.3.2/lib/settings.h Examining data/libqmatrixclient-0.5.3.2/lib/ssosession.cpp Examining data/libqmatrixclient-0.5.3.2/lib/ssosession.h Examining data/libqmatrixclient-0.5.3.2/lib/syncdata.cpp Examining data/libqmatrixclient-0.5.3.2/lib/syncdata.h Examining data/libqmatrixclient-0.5.3.2/lib/user.cpp Examining data/libqmatrixclient-0.5.3.2/lib/user.h Examining data/libqmatrixclient-0.5.3.2/lib/util.cpp Examining data/libqmatrixclient-0.5.3.2/lib/util.h FINAL RESULTS: data/libqmatrixclient-0.5.3.2/examples/qmc-example.cpp:286:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!tf->open()) data/libqmatrixclient-0.5.3.2/lib/connection.cpp:664:24: [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). contentSource->open(QIODevice::ReadOnly); data/libqmatrixclient-0.5.3.2/lib/connection.cpp:673: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). if (!sourceFile->open(QIODevice::ReadOnly)) data/libqmatrixclient-0.5.3.2/lib/connection.cpp:1373:21: [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 (outRoomFile.open(QFile::WriteOnly)) data/libqmatrixclient-0.5.3.2/lib/connection.cpp:1394: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). if (!outFile.open(QFile::WriteOnly)) data/libqmatrixclient-0.5.3.2/lib/jobs/downloadfilejob.cpp:46:29: [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->targetFile->open(QIODevice::WriteOnly)) data/libqmatrixclient-0.5.3.2/lib/jobs/downloadfilejob.cpp:53:53: [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 (!d->tempFile->isReadable() && !d->tempFile->open(QIODevice::WriteOnly)) data/libqmatrixclient-0.5.3.2/lib/jobs/requestdata.cpp:14: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). source->open(QIODevice::WriteOnly); data/libqmatrixclient-0.5.3.2/lib/syncdata.cpp:168: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). if(!roomFile.open(QIODevice::ReadOnly)) data/libqmatrixclient-0.5.3.2/lib/csapi/notifications.cpp:26:50: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fromJson(jo.value("read"_ls), result.read); data/libqmatrixclient-0.5.3.2/lib/csapi/notifications.h:41:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool read; data/libqmatrixclient-0.5.3.2/lib/jobs/downloadfilejob.cpp:85:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). auto bytes = reply->read(reply->bytesAvailable()); ANALYSIS SUMMARY: Hits = 12 Lines analyzed = 26425 in approximately 0.70 seconds (37586 lines/second) Physical Source Lines of Code (SLOC) = 16063 Hits@level = [0] 0 [1] 3 [2] 9 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 12 [1+] 12 [2+] 9 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 0.747058 [1+] 0.747058 [2+] 0.560294 [3+] 0 [4+] 0 [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.