| ... | @@ -1418,8 +1418,7 @@ fn decodeFseTable( | ... | @@ -1418,8 +1418,7 @@ fn decodeFseTable( |
| 1418 | } | 1418 | } |
| 1419 | bit_reader.alignToByte(); | 1419 | bit_reader.alignToByte(); |
| 1420 | | 1420 | |
| 1421 | // TODO: check there are at least 2 non-zero probabilities | 1421 | if (value_count < 2) return error.MalformedFseTable; |
| 1422 | | | |
| 1423 | if (accumulated_probability != total_probability) return error.MalformedFseTable; | 1422 | if (accumulated_probability != total_probability) return error.MalformedFseTable; |
| 1424 | if (value_count > expected_symbol_count) return error.MalformedFseTable; | 1423 | if (value_count > expected_symbol_count) return error.MalformedFseTable; |
| 1425 | | 1424 | |