Skip to content

Index out of bounds in JBig2Bitmap.cs #1

@GBriotti

Description

@GBriotti

I have a problem reading image from pdf.

Basically, in this snippet of code in JBig2Bitmap.cs, method readBitmap():
`
if (typicalPredictionGenericDecodingOn) {
int bit = arithmeticDecoder.decodeBit(ltpCX, arithmeticDecoder.genericRegionStats);
if (bit != 0) ltp = !ltp;

                    if (ltp) {
                        duplicateRow(row, row - 1);
                        continue;
                    }
                }

`
ltp is true but row is zero!

This is the output if debug is set to true:
validFile = False ==== Segments ==== ==== Segment Header ==== SegmentNumber = 1 SegmentType = 48 pageAssociationSizeSet = False deferredNonRetainSet = False referredToSegmentCount = 0 retentionFlags = 0 referredToSegments = pageAssociation = 1 dateLength = 19 ==== Page Information Dictionary ==== ==== Reading Page Information Dictionary ==== Bitmap size = 2368x1654 Resolution = 0x0 DEFAULT_PIXEL_VALUE=0 DEFAULT_COMBINATION_OPERATOR=0 symbolDictionaryFlags = 1 Page Striping = 0 ==== Segment Header ==== SegmentNumber = 2 SegmentType = 38 pageAssociationSizeSet = False deferredNonRetainSet = False referredToSegmentCount = 0 retentionFlags = 0 referredToSegments = pageAssociation = 1 dateLength = 22594 ==== Immediate Generic Region ==== ==== Reading Immediate Generic Region ==== Bitmap size = 2368x1654 Bitmap location = 0,0 EXTERNAL_COMBINATION_OPERATOR=0 region Segment flags = 0 MMR=0 GB_TEMPLATE=0 TPGDON=1 generic region Segment flags = 8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions