Merge "Add fbounds-safety annotations for data." into main

This commit is contained in:
James Zern
2025-08-20 14:07:31 -07:00
committed by Gerrit Code Review
2 changed files with 6 additions and 4 deletions

View File

@@ -33,7 +33,8 @@ static WEBP_INLINE int GradientPredictor(uint8_t a, uint8_t b, uint8_t c) {
return ((g & ~0xff) == 0) ? g : (g < 0) ? 0 : 255; // clip to 8bit return ((g & ~0xff) == 0) ? g : (g < 0) ? 0 : 255; // clip to 8bit
} }
WEBP_FILTER_TYPE WebPEstimateBestFilter(const uint8_t* data, int width, WEBP_FILTER_TYPE WebPEstimateBestFilter(
const uint8_t* WEBP_COUNTED_BY((size_t)width* height) data, int width,
int height, int stride) { int height, int stride) {
int i, j; int i, j;
int bins[WEBP_FILTER_LAST][SMAX]; int bins[WEBP_FILTER_LAST][SMAX];

View File

@@ -25,7 +25,8 @@ extern "C" {
#endif #endif
// Fast estimate of a potentially good filter. // Fast estimate of a potentially good filter.
WEBP_FILTER_TYPE WebPEstimateBestFilter(const uint8_t* data, int width, WEBP_FILTER_TYPE WebPEstimateBestFilter(
const uint8_t* WEBP_COUNTED_BY((size_t)width* height) data, int width,
int height, int stride); int height, int stride);
#ifdef __cplusplus #ifdef __cplusplus