mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1166252 - Reject lut8/16Type with empty CLUT grid. r=jrmuizel
This commit is contained in:
parent
bbd67481f5
commit
0553824ea4
@ -134,6 +134,8 @@ static void qcms_transform_module_clut_only(struct qcms_modular_transform *trans
|
||||
float* b_table = transform->b_clut;
|
||||
|
||||
for (i = 0; i < length; i++) {
|
||||
assert(transform->grid_size >= 1);
|
||||
|
||||
float linear_r = *src++;
|
||||
float linear_g = *src++;
|
||||
float linear_b = *src++;
|
||||
@ -188,6 +190,8 @@ static void qcms_transform_module_clut(struct qcms_modular_transform *transform,
|
||||
float* g_table = transform->g_clut;
|
||||
float* b_table = transform->b_clut;
|
||||
for (i = 0; i < length; i++) {
|
||||
assert(transform->grid_size >= 1);
|
||||
|
||||
float device_r = *src++;
|
||||
float device_g = *src++;
|
||||
float device_b = *src++;
|
||||
|
@ -715,6 +715,11 @@ static struct lutType *read_tag_lutType(struct mem_source *src, struct tag_index
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (clut_size <= 0) {
|
||||
invalid_source(src, "CLUT must not be empty.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (in_chan != 3 || out_chan != 3) {
|
||||
invalid_source(src, "CLUT only supports RGB");
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user