[git] GCRYPT - branch, master, updated. libgcrypt-1.6.0-175-g97db8e1
by Werner Koch
cvs at cvs.gnupg.org
Mon Mar 16 09:51:10 CET 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".
The branch, master has been updated
via 97db8e1a6400d711da65eff93bb418cf55bba12e (commit)
via 0a9cdb8ae092d050ca12a7a4f2f50e25b82154ec (commit)
via fbb97dcf763e28e81e01092ad4c934b3eaf88cc8 (commit)
from 5e66a4f8d5a63f58caeee367433dd8dd32346083 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 97db8e1a6400d711da65eff93bb418cf55bba12e
Author: Werner Koch <wk at gnupg.org>
Date: Mon Mar 16 09:32:44 2015 +0100
Indentation fix.
--
diff --git a/cipher/cipher-ocb.c b/cipher/cipher-ocb.c
index 652683c..62e79bb 100644
--- a/cipher/cipher-ocb.c
+++ b/cipher/cipher-ocb.c
@@ -300,8 +300,9 @@ _gcry_cipher_ocb_authenticate (gcry_cipher_hd_t c, const unsigned char *abuf,
/* Checksumming for encrypt and decrypt. */
-static void ocb_checksum(unsigned char *chksum, const unsigned char *plainbuf,
- size_t nblks)
+static void
+ocb_checksum (unsigned char *chksum, const unsigned char *plainbuf,
+ size_t nblks)
{
while (nblks > 0)
{
commit 0a9cdb8ae092d050ca12a7a4f2f50e25b82154ec
Author: Werner Koch <wk at gnupg.org>
Date: Mon Mar 16 09:29:27 2015 +0100
mpi: Remove useless condition.
* mpi/mpi-pow.c: Remove condition rp==mp.
--
MP has already been allocated and thus can't match RP. The followinf
assert would have been triggred anyway due to the prior allocation.
Detected by Stack 0.3.
diff --git a/mpi/mpi-pow.c b/mpi/mpi-pow.c
index 70bf9e8..0be153f 100644
--- a/mpi/mpi-pow.c
+++ b/mpi/mpi-pow.c
@@ -507,7 +507,8 @@ _gcry_mpi_powm (gcry_mpi_t res,
}
- /* Make BASE, EXPO and MOD not overlap with RES. */
+ /* Make BASE, EXPO not overlap with RES. We don't need to check MOD
+ because that has already been copied to the MP var. */
if ( rp == bp )
{
/* RES and BASE are identical. Allocate temp. space for BASE. */
@@ -523,14 +524,6 @@ _gcry_mpi_powm (gcry_mpi_t res,
ep = ep_marker = mpi_alloc_limb_space( esize, esec );
MPN_COPY(ep, rp, esize);
}
- if ( rp == mp )
- {
- /* RES and MOD are identical. Allocate temporary space for MOD.*/
- gcry_assert (!mp_marker);
- mp_nlimbs = msec?msize:0;
- mp = mp_marker = mpi_alloc_limb_space( msize, msec );
- MPN_COPY(mp, rp, msize);
- }
/* Copy base to the result. */
if (res->alloced < size)
commit fbb97dcf763e28e81e01092ad4c934b3eaf88cc8
Author: Werner Koch <wk at gnupg.org>
Date: Mon Mar 16 09:01:24 2015 +0100
cipher: Remove useless NULL check.
* cipher/hash-common.c (_gcry_md_block_write): Remove NUL check for
hd->buf.
--
HD->BUF is not allocated but part of the struct. HD has already be
dereferenced twice thus the check does not make sense. Detected by
Stack 0.3:
bug: anti-simplify
model: |
%cmp4 = icmp eq i8* %arraydecay, null, !dbg !29
--> false
stack:
- /home/wk/s/libgcrypt/cipher/hash-common.c:114:0
ncore: 1
core:
- /home/wk/s/libgcrypt/cipher/hash-common.c:108:0
- null pointer dereference
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/cipher/hash-common.c b/cipher/hash-common.c
index 9a007e1..6743f09 100644
--- a/cipher/hash-common.c
+++ b/cipher/hash-common.c
@@ -111,7 +111,7 @@ _gcry_md_block_write (void *context, const void *inbuf_arg, size_t inlen)
if (sizeof(hd->buf) < blocksize)
BUG();
- if (hd->buf == NULL || hd->bwrite == NULL)
+ if (!hd->bwrite)
return;
if (hd->count == blocksize) /* Flush the buffer. */
-----------------------------------------------------------------------
Summary of changes:
cipher/cipher-ocb.c | 5 +++--
cipher/hash-common.c | 2 +-
mpi/mpi-pow.c | 11 ++---------
3 files changed, 6 insertions(+), 12 deletions(-)
hooks/post-receive
--
The GNU crypto library
http://git.gnupg.org
_______________________________________________
Gnupg-commits mailing list
Gnupg-commits at gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-commits
More information about the Gcrypt-devel
mailing list