Two items, not two bytes

This commit is contained in:
Alexander Karpinsky 2022-01-04 18:02:19 +03:00
parent e8fa86d630
commit b5f03c9e74

View File

@ -761,7 +761,7 @@ _prepare_lut_table(PyObject *table, Py_ssize_t table_size) {
} }
/* malloc check ok, max is 2 * 4 * 65**3 = 2197000 */ /* malloc check ok, max is 2 * 4 * 65**3 = 2197000 */
prepared = (INT16 *)malloc(sizeof(INT16) * table_size + 2); prepared = (INT16 *)malloc(sizeof(INT16) * (table_size + 2));
if (!prepared) { if (!prepared) {
if (free_table_data) { if (free_table_data) {
free(table_data); free(table_data);