Re: Re: bug in pgcrypto 0.3 - Mailing list pgsql-hackers

From Ian Lance Taylor
Subject Re: Re: bug in pgcrypto 0.3
Date
Msg-id siitj3sn40.fsf@daffy.airs.com
Whole thread Raw
In response to Re: Re: bug in pgcrypto 0.3  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Re: bug in pgcrypto 0.3
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:

> Applied to 7.1.X and 7.2.

But, but...

> > -    return srclen + (srclen / 3) + (srclen / (76 / 2));
> > +    return srclen + (srclen + 2 / 3) + (srclen / (76 / 2)) + 2;

(srclen + 2 / 3) is always the same as (srclen).

Perhaps this was meant to be ((srclen + 2) / 3)?

The current code is safe, but weird.

Ian


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: 7.2 items
Next
From: Patrick Welche
Date:
Subject: Re: 7.2 items