Skip to content

Commit

Permalink
TableLookUp::setTable(): do actually check that the LUT is <2^16
Browse files Browse the repository at this point in the history
  • Loading branch information
LebedevRI committed Jan 11, 2018
1 parent 6af0e85 commit dbe7591
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/librawspeed/common/TableLookUp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ void TableLookUp::setTable(int ntable, const std::vector<ushort16>& table) {
assert(!table.empty());

const int nfilled = table.size();
if (nfilled >= 65536)
ThrowRDE("Table lookup with %i entries is unsupported", nfilled);

if (ntable > ntables) {
ThrowRDE("Table lookup with number greater than number of tables.");
Expand Down

0 comments on commit dbe7591

Please sign in to comment.