Project

General

Profile

Bug #12208

Bug #11581: Huffmantable is broken.

[2/3] Regression: huffmantable is bad for last decode

Added by Roman Lebedev 3 months ago.

Status:
New
Priority:
High
Assignee:
Category:
-
Target version:
-
Start date:
05/19/2018
Due date:
% Done:

0%

Affected Version:
git master branch
System:
all
bitness:
64-bit
hardware architecture:
amd64/x86

Description

Copied from https://github.com/darktable-org/rawspeed/issues/128

Some raws appear not to have padding at the end, so when we do `bs.fill(32);`, we fail.
Changing https://github.com/darktable-org/rawspeed/blob/d41fd6dadc161d1c0bb56463dc35263779fa02f1/src/librawspeed/decompressors/HuffmanTable.h#L309
```diff
-bs.fill(32);
+bs.fill(maxCodePlusDiffLength());
```
seems to help somewhat, but i don't know the full solution yet.

Also available in: Atom PDF