IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32687 for trunk


Ignore:
Timestamp:
Nov 17, 2011, 10:33:52 AM (14 years ago)
Author:
bills
Message:

Fix SEGV which may happen with corrupt input files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/magic/remove/src/streaksio.c

    r32252 r32687  
    632632
    633633    if (!isImage(in)) {
     634        psLogMsg("streaksremove", PS_LOG_INFO, "%s contains no image\n", in->name);
    634635        return;
    635636    }
     
    779780setupImageRefs(sFile *out, sFile *recoveryOut, sFile *in, int extnum, bool exciseAll)
    780781{
     782    if (!in->image) {
     783        // Input file is likely corrupt. XXX: Shouldn't we have caught this earlier?
     784        psError(PS_ERR_UNKNOWN, true, "image is null for extension %d of %s file is likely corrupt", extnum, in->name);
     785        streaksExit("", PS_EXIT_UNKNOWN_ERROR);
     786    }
    781787    if (!exciseAll) {
    782788        // set output image to be the input image
Note: See TracChangeset for help on using the changeset viewer.