neuswc

patched neuswc library (tracked)
git clone https://git.daat.foo/neuswc.git
Log | Files | Refs | README | LICENSE

warnings.patch (469B)


      1 diff --git a/libswc/decor.c b/libswc/decor.c
      2 index c402933..ad8edf5 100644
      3 --- a/libswc/decor.c
      4 +++ b/libswc/decor.c
      5 @@ -330,7 +330,8 @@ get_tiled_decor_buffer(struct decor_part_buffer *part, uint32_t width,
      6  		buffer_height = (height + 255) & ~255U;
      7  	}
      8  
      9 -	if (buffer_width > SIZE_MAX / 4) {
     10 +	/* in 64 bits, so the check means something where size_t has 32 */
     11 +	if ((uint64_t)buffer_width * 4 > SIZE_MAX) {
     12  		return NULL;
     13  	}
     14  	row_size = (size_t)buffer_width * 4;