(none) imager-devel
/ help / lists / applications / search /
 

Re: Cant read TIFF file: core dump (fwd)

From: Arnar Mar Hrafnkelsson (
05010@xyz.molar.is)
Date: Wed 23 Jan 2002 - 06:26:31 UTC

  • Next message: Neeraj - Khandelwal: "Re: Cant read TIFF file: core dump (fwd)"

    Yes - that's the result of running diff -u.

    Once you have the patch in a text file (named tiff_39.patch) you can apply
    the patch as described below.

    I've also put a patched version of the file at:

    http://imager.perl.org/addi/tiff.c

    You can just replace the std. tiff.c with that and recompile.

    -- Arnar.

    On Wed, 23 Jan 2002, Neeraj - Khandelwal wrote:

    >
    > My apologies, but I am not sure what the text patch reads. Is it output
    > from running the diff utility on the newer and the older tiff.c ?
    >
    > Many thanks
    > Neeraj.
    >
    >
    >
    > On Tue, 22 Jan 2002, Arnar Mar Hrafnkelsson wrote:
    >
    > >
    > > The crash is caused by a call to a function pointer that is NULL. We
    > > haven't implemented the sizeproc() method that libtiff uses. It doesn't
    > > usually call this method (I've never seen a file which makes it do
    > > so). But it does this as a compatability check against files which have
    > > zero in some fields because some broken software puts zeros when it
    > > doesn't know what values to put in those fields.
    > >
    > > I've included a patch (as a uuencoded message and also as raw text) that
    > > can be applied to 0.39 with something like : patch < tiff_39.patch
    > >
    > > For this case it works fine - I'm not sure if there are other cases hidden
    > > inside libtiff where it wants to know filesize when not using it's mmap()
    > > interface (which we are currently not using but will later).
    > >
    > > If someone cannot apply the patch or extract it from the message I'll put
    > > a patched tiff.c up on the web.
    > >
    > > -- Arnar
    > >
    > >
    > >
    > >
    > >
    > > begin 664 tiff_39.patch
    > > M+2TM('1I9F8N8PE4=64@2F%N(#(R(#(Q.C0R.C4U(#(P,#(**RLK('1I9F8N
    > > M8PE4=64@2F%N(#(R(#(Q.C0S.C`Q(#(P,#(*0$`@+34W+#8@*S4W+#$R($!`
    > > M"B!]"B`*(`HK"BMS=&%T:6,@=&]F9E]T('-I>F5P<F]C*'1H86YD;&5?="!X
    > > M*2!["BL)<F5T=7)N(#`["BM]"BL**PH@+RH*(#UI=&5M(&E?<F5A9'1I9F9?
    > > M=VEO;"AI9RP@;&5N9W1H*0H@"D!`("TY-2PW("LQ,#$L-R!`0`H@"0D@("`@
    > > M("`@*%1)1D9296%D5W)I=&50<F]C*2!I9RT^=W)I=&5C8BP*(`D)("`@("`@
    > > M("A4249&4V5E:U!R;V,I(&-O;7!?<V5E:RP*(`D)("`@("`@("A4249&0VQO
    > > M<V50<F]C*2!I9RT^8VQO<V5C8BP*+0D)("`@("`@("A4249&4VEZ95!R;V,I
    > > M(&EG+3YS:7IE8V(L"BL)"2`@("`@("!I9RT^<VEZ96-B(#\@*%1)1D93:7IE
    > > M4')O8RD@:6<M/G-I>F5C8B`Z("A4249&4VEZ95!R;V,I('-I>F5P<F]C+`H@
    > > M"0D@("`@("`@*%1)1D9-87!&:6QE4')O8RD@3E5,3"P*(`D)("`@("`@("A4
    > > =249&56YM87!&:6QE4')O8RD@3E5,3"D["B`@(`H`
    > > `
    > > end
    > >
    > >
    > >
    > >
    > > # actual patch follows
    > >
    > > --- tiff.c Tue Jan 22 21:42:55 2002
    > > +++ tiff.c Tue Jan 22 21:43:01 2002
    > > @@ -57,6 +57,12 @@
    > > }
    > >
    > >
    > > +
    > > +static toff_t sizeproc(thandle_t x) {
    > > + return 0;
    > > +}
    > > +
    > > +
    > > /*
    > > =item i_readtiff_wiol(ig, length)
    > >
    > > @@ -95,7 +101,7 @@
    > > (TIFFReadWriteProc) ig->writecb,
    > > (TIFFSeekProc) comp_seek,
    > > (TIFFCloseProc) ig->closecb,
    > > - (TIFFSizeProc) ig->sizecb,
    > > + ig->sizecb ? (TIFFSizeProc) ig->sizecb : (TIFFSizeProc) sizeproc,
    > > (TIFFMapFileProc) NULL,
    > > (TIFFUnmapFileProc) NULL);
    > >
    > >
    > >
    > >
    >
    >
    >



  •