CVE-2026-18370: Strlcpy Pointer Advance Overflow

Advancing a pointer or offset directly by the return value of 'strlcpy' can cause buffer overflows or integer underflows. 'strlcpy' returns the full length of the source string rather than the number of bytes written. If the source string exceeds the destination buffer size, the pointer will advance past the allocated boundary.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0C
greprules fetch cve-2026-18370-strlcpy-pointer-advance-overflow --engine opengrep

Description

Advancing a pointer or offset directly by the return value of 'strlcpy' can cause buffer overflows or integer underflows. 'strlcpy' returns the full length of the source string rather than the number of bytes written. If the source string exceeds the destination buffer size, the pointer will advance past the allocated boundary.