[DragonFlyBSD - Bug #3004] (New) sys/netgraph7/bluetooth/socket/ng_btsocket_hci_raw.c:808: suspicious size ?

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Fri Mar 31 06:00:50 PDT 2017


Issue #3004 has been reported by dcb.

----------------------------------------
Bug #3004: sys/netgraph7/bluetooth/socket/ng_btsocket_hci_raw.c:808: suspicious size ?
http://bugs.dragonflybsd.org/issues/3004

* Author: dcb
* Status: New
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
sys/netgraph7/bluetooth/socket/ng_btsocket_hci_raw.c:808]: (warning) Division by result of sizeof(). memset() expects a size in bytes, did you intend to multiply instead?

Source code is

    memset(&ng_btsocket_hci_raw_sec_filter->events, 0xff,
        sizeof(ng_btsocket_hci_raw_sec_filter->events)/
            sizeof(ng_btsocket_hci_raw_sec_filter->events[0]));

maybe better code

    memset(&ng_btsocket_hci_raw_sec_filter->events, 0xff,
        sizeof(ng_btsocket_hci_raw_sec_filter->events));





-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account


More information about the Bugs mailing list