commit 3123b68390e201ae67d6a6ebb7fc3301113f4b93
Author: Oswald Buddenhagen <o...@users.sf.net>
Date:   Sat Apr 13 10:50:56 2013 +0200

    more consistency in char signedness

 src/socket.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/socket.c b/src/socket.c
index f497449..c7eadcd 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -677,7 +677,7 @@ hexchar( unsigned int b )
 void
 cram( const char *challenge, const char *user, const char *pass, char 
**_final, int *_finallen )
 {
-       unsigned char *response, *final;
+       char *response, *final;
        unsigned hashlen;
        int i, clen, rlen, blen, flen, olen;
        unsigned char hash[16];
@@ -689,8 +689,8 @@ cram( const char *challenge, const char *user, const char 
*pass, char **_final,
        clen = strlen( challenge );
        /* response will always be smaller than challenge because we are 
decoding. */
        response = nfcalloc( 1 + clen );
-       rlen = EVP_DecodeBlock( response, (unsigned char *)challenge, clen );
-       HMAC_Update( &hmac, response, rlen );
+       rlen = EVP_DecodeBlock( (unsigned char *)response, (unsigned char 
*)challenge, clen );
+       HMAC_Update( &hmac, (unsigned char *)response, rlen );
        free( response );
 
        hashlen = sizeof(hash);
@@ -711,7 +711,7 @@ cram( const char *challenge, const char *user, const char 
*pass, char **_final,
        olen = EVP_EncodeBlock( (unsigned char *)final, (unsigned char *)buf, 
blen );
        assert( olen == flen );
 
-       *_final = (char *)final;
+       *_final = final;
        *_finallen = flen;
 }
 #endif

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to