Re: Patch: 6156

From: Dom Lachowicz <domlachowicz_at_yahoo.com>
Date: Tue Sep 14 2004 - 21:01:17 CEST

Patch approved.

--- Robert Wilhelm <robert.wilhelm@gmx.net> wrote:

> Attached patch fix 6156 ( crash random rubbish
> file).
>
> Before we tried to malloc(-4) and failed.
>
> Robert
> > Index: sprm.c
>
===================================================================
> RCS file: /cvsroot/wv/sprm.c,v
> retrieving revision 1.60
> diff -u -r1.60 sprm.c
> --- sprm.c 8 Mar 2004 23:16:16 -0000 1.60
> +++ sprm.c 14 Sep 2004 18:50:12 -0000
> @@ -1659,7 +1659,8 @@
> (*pos) += 2;
> istdLast = dread_16ubit (NULL, &pointer);
> (*pos) += 2;
> - if ((cch - 6) / 2 != 0)
> +
> + if (cch > 6)
> {
> rgistd = (U16 *) wvMalloc (sizeof (U16) * ((cch
> - 6) / 2));
> for (i = 0; i < (cch - 6) / 2; i++)
>

                
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
Received on Tue Sep 14 21:01:58 2004

This archive was generated by hypermail 2.1.8 : Tue Sep 14 2004 - 21:01:58 CEST