[AGENT++] BUG in auth_priv.cpp crashs application

Jochen Katz katz at agentpp.com
Wed Jan 4 02:10:31 CET 2006


Hi,

Stuart Marks pointetd me to a bug in the SNMP encryption modules, which
will lead to a crash of the application after some encryptions.

If you're using snmp++v3.2.18 or 3.2.19 you have to apply the patch
below to fix the problem.

Regards,
  Jochen

diff -u -r1.13 auth_priv.cpp
--- auth_priv.cpp       26 Aug 2005 16:48:27 -0000      1.13
+++ auth_priv.cpp       4 Jan 2006 01:05:30 -0000
@@ -1233,7 +1233,7 @@
                      const unsigned long  /*engine_time*/)
 {
   unsigned char initVect[8];
-  pp_uint64     my_salt = *salt++;
+  pp_uint64     my_salt = (*salt)++;

 #ifdef INVALID_ENCRYPTION
   debugprintf(-10, "\nWARNING: Encrypting with zeroed salt!\n");
@@ -1378,7 +1378,7 @@
                       const unsigned long  /*engine_time*/)
 {
   IDEAContext CFB_Context;
-  pp_uint64 my_salt = *salt++;
+  pp_uint64 my_salt = (*salt)++;

 #ifdef INVALID_ENCRYPTION
   debugprintf(-10, "\nWARNING: Encrypting with zeroed salt!\n");
@@ -1543,7 +1543,7 @@
                     const unsigned long  engine_time)
 {
   unsigned char initVect[16];
-  pp_uint64 my_salt = *salt++;
+  pp_uint64 my_salt = (*salt)++;

 #ifdef INVALID_ENCRYPTION
   debugprintf(-10, "\nWARNING: Encrypting with zeroed salt!\n");
@@ -1739,7 +1739,7 @@
                      const unsigned long  engine_time)
 {
   unsigned char initVect[8];
-  pp_uint64     my_salt = *salt++;
+  pp_uint64     my_salt = (*salt)++;

 #ifdef INVALID_ENCRYPTION
   debugprintf(-10, "\nWARNING: Encrypting with zeroed salt!\n");



More information about the AGENTPP mailing list