Home
last modified time | relevance | path

Searched hist:c10d567ea022de8705fb23f8563c4726f2d09ca0 (Results 1 – 2 of 2) sorted by relevance

/freebsd/lib/libc/secure/
H A Dmemcpy_chk.cdiff c10d567ea022de8705fb23f8563c4726f2d09ca0 Sat Jul 13 07:16:10 CEST 2024 Kyle Evans <kevans@FreeBSD.org> include: de-macro __ssp_overlap(), improve semantics and checking

Switch away from pointer arithmetic to provide more obvious semantics
for checking overlap on pointer ranges. This lets us remove some casts
that need not exist and removes some possible fragility in its use.

While we're here, check for overflow just in case; sometimes we use a
caller-supplied size if __builtin_object_size(3) can't deduce the buffer
size, and we should fail the check if the size is nonsensical for the
provided buffers.

Reviewed by: markj
Sponsored by: Klara, Inc.
Sponsored by: Stormshield
/freebsd/include/ssp/
H A Dssp.hdiff c10d567ea022de8705fb23f8563c4726f2d09ca0 Sat Jul 13 07:16:10 CEST 2024 Kyle Evans <kevans@FreeBSD.org> include: de-macro __ssp_overlap(), improve semantics and checking

Switch away from pointer arithmetic to provide more obvious semantics
for checking overlap on pointer ranges. This lets us remove some casts
that need not exist and removes some possible fragility in its use.

While we're here, check for overflow just in case; sometimes we use a
caller-supplied size if __builtin_object_size(3) can't deduce the buffer
size, and we should fail the check if the size is nonsensical for the
provided buffers.

Reviewed by: markj
Sponsored by: Klara, Inc.
Sponsored by: Stormshield