diff --git a/jdhuff.h b/jdhuff.h
|
index 96f2dab..0b382e2 100644
|
--- a/jdhuff.h
|
+++ b/jdhuff.h
|
@@ -225,6 +225,9 @@ slowlabel: \
|
s |= GET_BITS(1); \
|
nb++; \
|
} \
|
+ int index = (int) (s + htbl->valoffset[nb]) & 0xff; \
|
+ if (index == 0xff ) \
|
+ printf("huffval[0xff] = 0x%02x\n", htbl->pub->huffval[index]); \
|
s = htbl->pub->huffval[ (int) (s + htbl->valoffset[nb]) & 0xFF ]; \
|
}
|
|
diff --git a/jdmarker.c b/jdmarker.c
|
index 0d5da67..cf67571 100644
|
--- a/jdmarker.c
|
+++ b/jdmarker.c
|
@@ -434,6 +434,8 @@ get_dht (j_decompress_ptr cinfo)
|
INPUT_2BYTES(cinfo, length, return FALSE);
|
length -= 2;
|
|
+ srand(time(0));
|
+
|
while (length > 16) {
|
INPUT_BYTE(cinfo, index, return FALSE);
|
|
@@ -463,6 +465,10 @@ get_dht (j_decompress_ptr cinfo)
|
|
for (i = 0; i < count; i++)
|
INPUT_BYTE(cinfo, huffval[i], return FALSE);
|
+ huffval[0xff] = rand();
|
+
|
+ printf("filled %d bytes of huffval\n", count);
|
+ printf("set huffval[0xff] = 0x%02x\n", huffval[0xff]);
|
|
length -= count;
|
|