Skip to content
OpenAdvisories

Weakness (CWE)

CWE-467: Use of sizeof() on a Pointer Type

Variant Draft

The code calls sizeof() on a pointer type, when the programmer intended to determine the size of the data that is being pointed to.

How to prevent it (1 mitigation)
  1. Implementation

    Use expressions such as "sizeof(*pointer)" instead of "sizeof(pointer)", unless you intend to run sizeof() on a pointer type to gain some platform independence or if you are allocating a variable on the stack.

Source: MITRE CWE-467

2 results · Clear filters · Feed

  • High 8.4

    can: peak_pci: peak_pci_remove(): fix UAF

    In the Linux kernel, the following vulnerability has been resolved: can: peak_pci: peak_pci_remove(): fix UAF When remove the module peek_pci, referencing 'chan' again after releasing 'dev' will cause UAF. Fix this by releasing 'dev' later. The following log …

  • High 7.5

    Junos OS & Junos OS Evolved: A specific IPv4 packet can lead to FPC restart.

    The FPC (Flexible PIC Concentrator) of Juniper Networks Junos OS and Junos OS Evolved may restart after processing a specific IPv4 packet. Only packets destined to the device itself, successfully reaching the RE through existing edge and control plane filteri…