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/libhinawa-2.1.0/src/fw_fcp.c Examining data/libhinawa-2.1.0/src/fw_fcp.h Examining data/libhinawa-2.1.0/src/fw_node.c Examining data/libhinawa-2.1.0/src/fw_node.h Examining data/libhinawa-2.1.0/src/fw_req.c Examining data/libhinawa-2.1.0/src/fw_req.h Examining data/libhinawa-2.1.0/src/fw_resp.c Examining data/libhinawa-2.1.0/src/fw_resp.h Examining data/libhinawa-2.1.0/src/hinawa_enum_types.h Examining data/libhinawa-2.1.0/src/internal.h Examining data/libhinawa-2.1.0/src/snd_dg00x.c Examining data/libhinawa-2.1.0/src/snd_dg00x.h Examining data/libhinawa-2.1.0/src/snd_dice.c Examining data/libhinawa-2.1.0/src/snd_dice.h Examining data/libhinawa-2.1.0/src/snd_efw.c Examining data/libhinawa-2.1.0/src/snd_efw.h Examining data/libhinawa-2.1.0/src/snd_motu.c Examining data/libhinawa-2.1.0/src/snd_motu.h Examining data/libhinawa-2.1.0/src/snd_tscm.c Examining data/libhinawa-2.1.0/src/snd_tscm.h Examining data/libhinawa-2.1.0/src/snd_unit.c Examining data/libhinawa-2.1.0/src/snd_unit.h FINAL RESULTS: data/libhinawa-2.1.0/src/fw_fcp.c:258: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(w->frame, frame, frame_size); data/libhinawa-2.1.0/src/fw_node.c:308: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). priv->fd = open(path, O_RDONLY); data/libhinawa-2.1.0/src/fw_req.c:263: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(w->frame, frame, w->length); data/libhinawa-2.1.0/src/fw_resp.c:261: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(priv->resp_frame, frame, length); data/libhinawa-2.1.0/src/fw_resp.c:287: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(priv->req_frame, event->data, event->length); data/libhinawa-2.1.0/src/snd_dice.c:182: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(req_frame + i * sizeof(quad), &quad, sizeof(quad)); data/libhinawa-2.1.0/src/snd_efw.c:230: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(w->params, params, param_count * sizeof(*params)); data/libhinawa-2.1.0/src/snd_unit.c:240: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 fw_cdev[32]; data/libhinawa-2.1.0/src/snd_unit.c:252: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). priv->fd = open(path, O_RDWR); data/libhinawa-2.1.0/src/fw_node.c:299: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). g_return_if_fail(path != NULL && strlen(path) > 0); data/libhinawa-2.1.0/src/fw_node.c:417:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(priv->fd, src->buf, src->len); data/libhinawa-2.1.0/src/snd_dg00x.c:76: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). g_return_if_fail(path != NULL && strlen(path) > 0); data/libhinawa-2.1.0/src/snd_dice.c:120: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). g_return_if_fail(path != NULL && strlen(path) > 0); data/libhinawa-2.1.0/src/snd_efw.c:126: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). g_return_if_fail(path != NULL && strlen(path) > 0); data/libhinawa-2.1.0/src/snd_motu.c:79: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). g_return_if_fail(path != NULL && strlen(path) > 0); data/libhinawa-2.1.0/src/snd_tscm.c:85: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). g_return_if_fail(path != NULL && strlen(path) > 0); data/libhinawa-2.1.0/src/snd_unit.c:243: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). g_return_if_fail(path != NULL && strlen(path) > 0); data/libhinawa-2.1.0/src/snd_unit.c:506:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(priv->fd, src->buf, src->len); ANALYSIS SUMMARY: Hits = 18 Lines analyzed = 4418 in approximately 0.25 seconds (17440 lines/second) Physical Source Lines of Code (SLOC) = 2664 Hits@level = [0] 1 [1] 9 [2] 9 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 19 [1+] 18 [2+] 9 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 7.13213 [1+] 6.75676 [2+] 3.37838 [3+] 0 [4+] 0 [5+] 0 Dot directories skipped = 2 (--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.