|
Lines 1277-1283
CCITTFaxStream::CCITTFaxStream(Stream *s
Link Here
|
| 1277 |
endOfLine = endOfLineA; |
1277 |
endOfLine = endOfLineA; |
| 1278 |
byteAlign = byteAlignA; |
1278 |
byteAlign = byteAlignA; |
| 1279 |
columns = columnsA; |
1279 |
columns = columnsA; |
| 1280 |
if (columns < 1) { |
1280 |
if (columns + 3 < 1 || columns + 4 < 1 || columns < 1) { |
| 1281 |
columns = 1; |
1281 |
columns = 1; |
| 1282 |
} |
1282 |
} |
| 1283 |
rows = rowsA; |
1283 |
rows = rowsA; |
|
Lines 3066-3077
GBool DCTStream::readHuffmanTables() {
Link Here
|
| 3066 |
while (length > 0) { |
3066 |
while (length > 0) { |
| 3067 |
index = str->getChar(); |
3067 |
index = str->getChar(); |
| 3068 |
--length; |
3068 |
--length; |
| 3069 |
if ((index & 0x0f) >= 4) { |
3069 |
if ((index & ~0x10) >= 4 || (index & ~0x10) < 0) { |
| 3070 |
error(getPos(), "Bad DCT Huffman table"); |
3070 |
error(getPos(), "Bad DCT Huffman table"); |
| 3071 |
return gFalse; |
3071 |
return gFalse; |
| 3072 |
} |
3072 |
} |
| 3073 |
if (index & 0x10) { |
3073 |
if (index & 0x10) { |
| 3074 |
index &= 0x0f; |
3074 |
index &= 0x03; |
| 3075 |
if (index >= numACHuffTables) |
3075 |
if (index >= numACHuffTables) |
| 3076 |
numACHuffTables = index+1; |
3076 |
numACHuffTables = index+1; |
| 3077 |
tbl = &acHuffTables[index]; |
3077 |
tbl = &acHuffTables[index]; |