Merge branch 'glibcxx-assertions-abort' into 'master'

genesys: Fix #156 - [Fedora] Abort due out-of-bound access

Closes #156

See merge request sane-project/backends!224
merge-requests/227/merge
Povilas Kanapickas 2019-10-25 20:22:38 +00:00
commit fe30fbe893
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -805,6 +805,11 @@ void sanei_genesys_create_default_gamma_table(Genesys_Device* dev,
size = 4096;
}
max = size - 1;
} else if (dev->model->asic_type == AsicType::GL124 ||
dev->model->asic_type == AsicType::GL846 ||
dev->model->asic_type == AsicType::GL847) {
size = 257;
max = 65535;
} else {
size = 256;
max = 65535;