diff options
| author | Bruce Momjian | 2002-01-03 07:21:48 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2002-01-03 07:21:48 +0000 |
| commit | b490469cb99a7867420ee586b913108e4909418a (patch) | |
| tree | 24b176c5663951f34e7309662ca07fd486fa3b31 /contrib/pgcrypto | |
| parent | bc29b06b0aaa2ed1d1117af03918697694135314 (diff) | |
> > On Fri, Dec 21, 2001 at 11:43:21AM +0800, Christopher Kings-Lynne
wrote:
> > > Just testing pgcrypto on freebsd/alpha. I get some warnings:
> > They should be harmless, although I should fix them.
>
> The actual code is:
>
> if ((dlen & 15) || (((unsigned) res) & 3))
> return -1;
> Hard to imagine how (uint *) & 3 makes any sense, unless res isn't
> always a (uint8 *). Is that true?
At some point it was casted to (uint32*) so I wanted to be sure its ok.
ATM its pointless. Please apply the following patch.
--
marko
Diffstat (limited to 'contrib/pgcrypto')
| -rw-r--r-- | contrib/pgcrypto/internal.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/pgcrypto/internal.c b/contrib/pgcrypto/internal.c index 8ba4790c44..9a983299e6 100644 --- a/contrib/pgcrypto/internal.c +++ b/contrib/pgcrypto/internal.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: internal.c,v 1.10 2001/11/20 18:54:07 momjian Exp $ + * $Id: internal.c,v 1.11 2002/01/03 07:21:48 momjian Exp $ */ @@ -311,7 +311,7 @@ rj_encrypt(PX_Cipher * c, const uint8 *data, unsigned dlen, uint8 *res) if (dlen == 0) return 0; - if ((dlen & 15) || (((unsigned) res) & 3)) + if (dlen & 15) return -1; memcpy(res, data, dlen); @@ -339,7 +339,7 @@ rj_decrypt(PX_Cipher * c, const uint8 *data, unsigned dlen, uint8 *res) if (dlen == 0) return 0; - if ((dlen & 15) || (((unsigned) res) & 3)) + if (dlen & 15) return -1; memcpy(res, data, dlen); @@ -426,7 +426,7 @@ bf_encrypt(PX_Cipher * c, const uint8 *data, unsigned dlen, uint8 *res) if (dlen == 0) return 0; - if ((dlen & 7) || (((unsigned) res) & 3)) + if (dlen & 7) return -1; memcpy(res, data, dlen); @@ -450,7 +450,7 @@ bf_decrypt(PX_Cipher * c, const uint8 *data, unsigned dlen, uint8 *res) if (dlen == 0) return 0; - if ((dlen & 7) || (((unsigned) res) & 3)) + if (dlen & 7) return -1; memcpy(res, data, dlen); |
