Skip site navigation (1) Skip section navigation (2)

Re: pgcryto failures on freebsd/alpha

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Marko Kreen <marko(at)l-t(dot)ee>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgcryto failures on freebsd/alpha
Date: 2002-01-03 06:13:55
Message-ID: 200201030613.g036Dtv15980@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Marko Kreen wrote:
> On Fri, Dec 21, 2001 at 11:43:21AM +0800, Christopher Kings-Lynne wrote:
> > Hi Marko,
> > 
> > Just testing pgcrypto on freebsd/alpha.  I get some warnings:
> > 
> > gcc -pipe -O -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPIC  
> > -DRAND_SILLY -I.  -I. -I../../src/include   -c -
> > o internal.o internal.c
> > internal.c: In function `rj_encrypt':
> > internal.c:314: warning: cast from pointer to integer of different size
> > internal.c: In function `rj_decrypt':
> > internal.c:342: warning: cast from pointer to integer of different size
> > internal.c: In function `bf_encrypt':
> > internal.c:429: warning: cast from pointer to integer of different size
> > internal.c: In function `bf_decrypt':
> > internal.c:453: warning: cast from pointer to integer of different size
> 
> They should be harmless, although I should fix them.

The actual code is:

    if ((dlen & 15) || (((unsigned) res) & 3))
        return -1;

while res is defined as an uint8 pointer:

    rj_encrypt(PX_Cipher * c, const uint8 *data, unsigned dlen, uint8 *res)

Hard to imagine how (uint *) & 3 makes any sense, unless res isn't
always a (uint8 *).  Is that true?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2002-01-03 06:25:52
Subject: Re: contrib idea
Previous:From: Bruce MomjianDate: 2002-01-03 06:11:14
Subject: Re: Status on RC1?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group