mirror of
https://github.com/webmproject/libwebp.git
synced 2025-08-28 06:42:27 +02:00
Create src/utils/bounds_safety.h
The macros in src/utils/bounds_safety.h exist to ensure libwebp stays portable. This also provides wrappers around common functions like memcpy/memset/memmove, which are useful as part of the migration. Memcpy (et al.) wrappers aren't expected to exist forever, and can be removed after the codebase is fully annotated. There's some complexity here due to the number of states we need to support: 1) Off everywhere 2) Building libwebp (some or all) with -fbounds-safety 3) Linking against libwebp that was built with -fbounds-safety 4) Inter-operation with C++ Change-Id: I789f0a94f25b70cab172d5b3f5e6b12de3a34bb4
This commit is contained in:
@@ -414,6 +414,7 @@ add_library(webp $<TARGET_OBJECTS:webpdecode> $<TARGET_OBJECTS:webpdsp>
|
||||
$<TARGET_OBJECTS:webpencode> $<TARGET_OBJECTS:webputils>)
|
||||
if(WEBP_ENABLE_FBOUNDS_SAFETY)
|
||||
# Enable -fbounds-safety only for webputils for now.
|
||||
add_definitions(-DWEBP_SUPPORT_FBOUNDS_SAFETY=1)
|
||||
target_compile_options(webputils PRIVATE -fbounds-safety)
|
||||
endif()
|
||||
|
||||
|
Reference in New Issue
Block a user