ZSANITIZEM: The 2 maybe issues due to -fsanitize=memory were

also false positives so surround with ZSANITIZEM conditional
gif.c: some code fiddling (remove unnecessary braces)
output.c: out_colour_char_to_rgb: take unsigned char
general: some casts
This commit is contained in:
gitlost 2025-02-19 17:51:23 +00:00
parent c7cf006e71
commit 888b4b5684
7 changed files with 65 additions and 58 deletions

View file

@ -185,7 +185,9 @@ static int save_raster_image_to_file(struct zint_symbol *symbol, const int image
if (!(rotated_pixbuf = (unsigned char *) raster_malloc((size_t) image_size, 0 /*prev_size*/))) {
return errtxt(ZINT_ERROR_MEMORY, symbol, 650, "Insufficient memory for pixel buffer");
}
#ifdef ZINT_SANITIZEM /* Suppress clang -fsanitize=memory false positive */
memset(rotated_pixbuf, DEFAULT_PAPER, image_size);
#endif
}
/* Rotate image before plotting */