[git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-371-ge241dde

by Werner Koch cvs at cvs.gnupg.org
Fri Nov 8 17:22:52 CET 2013


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  e241dde1420475459e32608137829e52748d0212 (commit)
      from  9f63c0f7a3b2c15c7e258cd17395cabd0a8f00cc (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 e241dde1420475459e32608137829e52748d0212
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Nov 8 17:21:02 2013 +0100

    cipher: Avoid signed divisions in idea.c
    
    * cipher/idea.c (mul_inv): Use unsigned division.
    --
    
    Reported-by: Vladimir 'φ-coder/phcoder' Serbinenko <phcoder at gmail.com>
    
      Hello, all. While compiling in an environment with only libgcc
      subset for ARM, I found out that idea.c uses signed divisions:
      Reading the code this seems to be unintended. Inlined patch replaces
      them with more appropriate unsigned division.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/cipher/idea.c b/cipher/idea.c
index 7d91a9a..14234cf 100644
--- a/cipher/idea.c
+++ b/cipher/idea.c
@@ -72,8 +72,8 @@ mul_inv( u16 x )
 
     if( x < 2 )
 	return x;
-    t1 = 0x10001L / x;
-    y =  0x10001L % x;
+    t1 = 0x10001UL / x;
+    y =  0x10001UL % x;
     if( y == 1 )
 	return (1-t1) & 0xffff;
 

-----------------------------------------------------------------------

Summary of changes:
 cipher/idea.c |    4 ++--
 1 file changed, 2 insertions(+), 2 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