CVE-2025-2757: Unchecked Pointer Diff Memcpy
Calculated string length from pointer arithmetic is passed to memcpy without bounds checking. This can lead to a heap-based buffer overflow if the parsed string is longer than the fixed-size destination buffer. Add a bounds check against the calculated length before performing the memory copy.
Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0C++β
greprules fetch cve-2025-2757-unchecked-pointer-diff-memcpy --engine opengrepDescription
Calculated string length from pointer arithmetic is passed to memcpy without bounds checking. This can lead to a heap-based buffer overflow if the parsed string is longer than the fixed-size destination buffer. Add a bounds check against the calculated length before performing the memory copy.
Community feedback
0 signals from signed-in users.
- Useful
- 0
- False positive
- 0
- Metadata
- 0