Changeset 541


Ignore:
Timestamp:
Aug 20, 2016, 8:19:30 PM (4 years ago)
Author:
Gregg Young
Message:

Prevent loading of zero page pdf files with error message File damaged! Ticket #288

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/plugins/lupoppler/lupoppler.cpp

    r522 r541  
    16131613
    16141614    long numpages = document->doc->getNumPages();
     1615    if ( numpages <= 0 ) {
     1616        *errorCode = LU_LDERR_DAMAGED;
     1617        return FALSE;
     1618    }
    16151619    document->pages = new PopplerPage[ numpages ];
    16161620    for ( long pagenum = 0; pagenum < numpages; pagenum++ ) {
Note: See TracChangeset for help on using the changeset viewer.