Date: Tue, 14 Oct 2003 10:48:14 -0700 (PDT) From: Nate Lawson <nate@root.org> To: Hajimu UMEMOTO <ume@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/crypto/rijndael rijndael-api-fst.c Message-ID: <20031014104645.L31046@root.org> In-Reply-To: <20031014133812.8478616A573@hub.freebsd.org> References: <20031014133812.8478616A573@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 14 Oct 2003, Hajimu UMEMOTO wrote: > Modified files: > sys/crypto/rijndael rijndael-api-fst.c > Log: > Fix alignment problem on 64 bit arch. > I only tested if it doesn't break anything on i368. Since I > have no 64 bit machine, I cannot test it, actually. > > Reported by: jmallett > > Revision Changes Path > 1.9 +49 -0 src/sys/crypto/rijndael/rijndael-api-fst.c > > Index: src/sys/crypto/rijndael/rijndael-api-fst.c > diff -u src/sys/crypto/rijndael/rijndael-api-fst.c:1.8 src/sys/crypto/rijndael/rijndael-api-fst.c:1.9 > --- src/sys/crypto/rijndael/rijndael-api-fst.c:1.8 Sun Oct 12 14:05:05 2003 > +++ src/sys/crypto/rijndael/rijndael-api-fst.c Tue Oct 14 06:37:37 2003 > @@ -103,7 +103,11 @@ > int rijndael_blockEncrypt(cipherInstance *cipher, keyInstance *key, > BYTE *input, int inputLen, BYTE *outBuffer) { > int i, k, t, numBlocks; > +#if 1 /*STRICT_ALIGN*/ > + u_int8_t block[16], iv[16]; > +#else > u_int8_t block[16], *iv; > +#endif > > if (cipher == NULL || > key == NULL || Allocating data on the stack does not give you guaranteed alignment. -Nate
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031014104645.L31046>