Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/crypto/external/bsd/netpgp/dist/src/netpgpverify Avoid ty...



details:   https://anonhg.NetBSD.org/src/rev/db78adf6dbda
branches:  netbsd-7
changeset: 798674:db78adf6dbda
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Dec 09 19:02:01 2014 +0000

description:
Avoid type-punned pointer deref, requested by agc in #297

diffstat:

 crypto/external/bsd/netpgp/dist/src/netpgpverify/tiger.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 16d182308853 -r db78adf6dbda crypto/external/bsd/netpgp/dist/src/netpgpverify/tiger.c
--- a/crypto/external/bsd/netpgp/dist/src/netpgpverify/tiger.c  Tue Dec 09 18:59:42 2014 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/netpgpverify/tiger.c  Tue Dec 09 19:02:01 2014 +0000
@@ -819,7 +819,7 @@
        for (; j < 56; j++) {
                u.temp8[j] = 0;
        }
-       ((uint64_t *)(void *)(&(u.temp8[56])))[0] = ((uint64_t)length) << 3;
+       u.temp64[7] = ((uint64_t)length) << 3;
        tiger_compress(u.temp64, ctx->ctx);
 }
 



Home | Main Index | Thread Index | Old Index