Commit: Re: Patch: 2633

From: Robert Wilhelm <robert.wilhelm_at_gmx.net>
Date: Sun Sep 12 2004 - 17:13:48 CEST

Fix abi2_test.doc from bug 2633.
CVS:
----------------------------------------------------------------------
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: pap.c
CVS:
----------------------------------------------------------------------

Could be backported.

On Sun, 2004-09-12 at 15:58, Dom Lachowicz wrote:
> Robert,
>
> Patch approved. Nice work!
>
> Dom
>
> --- Robert Wilhelm <robert.wilhelm@gmx.net> wrote:
>
> >
> > By guarding against several null pointer accesses of
> > ps->lfo in
> > wv/pap.c,
> > I can load the second file (abi2_test.doc) in bug
> > 2633.
> >
> > Dom, please have a look at this.
> >
> > Robert
> > > Index: pap.c
> >
> ===================================================================
> > RCS file: /cvsroot/wv/pap.c,v
> > retrieving revision 1.33
> > diff -u -r1.33 pap.c
> > --- pap.c 28 May 2003 13:41:25 -0000 1.33
> > +++ pap.c 12 Sep 2004 05:56:28 -0000
> > @@ -354,7 +354,8 @@
> > wvTrace(("list: ilvl %d, ilfo
> > %d\n",apap->ilvl,apap->ilfo)); /* ilvl is the list
> > level */
> >
> > /* first, get the LFO, and then find the lfovl for
> > this paragraph */
> > - myLFO = &ps->lfo[apap->ilfo - 1];
> > + if (ps->lfo)
> > + myLFO = &ps->lfo[apap->ilfo - 1];
> >
> > while(i < (S32)apap->ilfo - 1 && i <
> > (S32)ps->nolfo)
> > {
> > @@ -363,7 +364,10 @@
> > }
> >
> > /* remember how many overrides are there for this
> > record */
> > - k = ps->lfo[i].clfolvl;
> > + if (ps->lfo)
> > + k = ps->lfo[i].clfolvl;
> > + else
> > + k = 0;
> >
> > /* if there are any overrides, then see if one of
> > them applies to this level */
> > if(k && ps->lfolvl)
> > @@ -454,7 +458,7 @@
> > {
> > prevLVL = myLVL;
> > prevLVLF = myLVLF;
> > - myListId = myLFO->lsid;
> > + myListId = myLFO ? myLFO->lsid : 0;
> > wvTrace(("list: using the LVL from LST\n"));
> > i = 0;
> >
> >
>
>
>
>
> _______________________________
> Do you Yahoo!?
> Shop for Back-to-School deals on Yahoo! Shopping.
> http://shopping.yahoo.com/backtoschool
>
Received on Sun Sep 12 17:13:41 2004

This archive was generated by hypermail 2.1.8 : Sun Sep 12 2004 - 17:13:42 CEST