From 696b476568263ab6158ce38350c27a6ff6e732ca Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Sat, 3 Jan 2009 22:09:51 +0100 Subject: BUGFIX: Fixed unintended truncation of the session key and session seed values --- plugin/eurephiadb_session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugin') diff --git a/plugin/eurephiadb_session.c b/plugin/eurephiadb_session.c index 8ae338c..58e93db 100644 --- a/plugin/eurephiadb_session.c +++ b/plugin/eurephiadb_session.c @@ -103,7 +103,7 @@ eurephiaSESSION *eDBopen_session_seed(eurephiaCTX *ctx, const char *digest, for( i = 0; i < SHA512_HASH_SIZE; i++ ) { sprintf(ptr, "%02x", sha_res[i]); - ptr++; + ptr += 2; } memset(&sha, 0, sizeof(SHA512Context)); memset(&sha_res, 0, sizeof(sha_res)); @@ -180,7 +180,7 @@ eurephiaSESSION *eDBopen_session_seed(eurephiaCTX *ctx, const char *digest, ptr = new_session->sessionkey; for( i = 0; i < SHA512_HASH_SIZE; i++ ) { sprintf(ptr, "%02x", sha_res[i]); - ptr++; + ptr += 2; } memset(&sha, 0, sizeof(SHA512Context)); memset(&sha_res, 0, sizeof(sha_res)); -- cgit