Skip to content
OpenAdvisories

Weakness (CWE)

CWE-469: Use of Pointer Subtraction to Determine Size

Base Draft

The product subtracts one pointer from another in order to determine size, but this calculation can be incorrect if the pointers do not exist in the same memory chunk.

How to prevent it (1 mitigation)
  1. Implementation

    Save an index variable. This is the recommended solution. Rather than subtract pointers from one another, use an index variable of the same size as the pointers in question. Use this variable to "walk" from one pointer to the other and calculate the difference. Always validate this number.

Source: MITRE CWE-469

1 result · Feed

  • Medium 6.2

    jetAudio 8.1.7.20702 Basic Denial of Service via URL Handler

    jetAudio 8.1.7.20702 Basic contains a denial of service vulnerability that allows local attackers to crash the application by supplying an excessively long string through the URL input handler. Attackers can trigger the crash by pasting a buffer of 5000 chara…