LibTIFF 4.7.2
TIFF library public API and implementation reference
Loading...
Searching...
No Matches
tiff_bounds_safety.h File Reference

Define portability macros for optional bounds-safety annotations. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Detailed Description

Define portability macros for optional bounds-safety annotations.

TIFF_COUNTED_BY_OR_NULL(n) documents that a pointer field points to n elements (or is NULL). It expands to nothing unless TIFF_ENABLE_COUNTED_BY is defined (CMake option tiff-counted-by, or configure –enable-counted-by) and the compiler supports the counted_by_or_null attribute (Clang only, C only). Combined with -fsanitize=bounds, out-of-bounds indexing of an annotated field then traps at run time.

Definition in file tiff_bounds_safety.h.