diff --git a/ChangeLog b/ChangeLog index d4fc4cf..cb54fa1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,9 +2,14 @@ Version 1.6.7 ******************************************************************************* +2010-04-25 Marcelo Jimenez + Define PROTOTYPES to be one by default in global.h. This affects the + RSA MD5 code. + 2010-03-27 Nick Leverton Subscription auto-renewals copy the renewal time from old subscription. + 2010-03-27 Marcelo Jimenez Backport of svn revision 527: * Added API to ithread, created the following functions: diff --git a/upnp/src/inc/global.h b/upnp/src/inc/global.h index 570700d..7e28174 100644 --- a/upnp/src/inc/global.h +++ b/upnp/src/inc/global.h @@ -38,13 +38,13 @@ /* PROTOTYPES should be set to one if and only if the compiler supports function argument prototyping. - The following makes PROTOTYPES default to 0 if it has not already + The following makes PROTOTYPES default to 1 if it has not already been defined with C compiler flags. */ #ifndef PROTOTYPES - #define PROTOTYPES 0 + #define PROTOTYPES 1 #endif /* POINTER defines a generic pointer type */ diff --git a/upnp/src/inc/sysdep.h b/upnp/src/inc/sysdep.h index eb8980a..51d020b 100644 --- a/upnp/src/inc/sysdep.h +++ b/upnp/src/inc/sysdep.h @@ -83,7 +83,7 @@ typedef struct { void get_ieee_node_identifier(uuid_node_t *node); void get_system_time(uuid_time_t *uuid_time); -void get_random_info(char seed[16]); +void get_random_info(unsigned char seed[16]); #endif /* SYSDEP_H */ diff --git a/upnp/src/uuid/sysdep.c b/upnp/src/uuid/sysdep.c index c90467b..711c5f0 100644 --- a/upnp/src/uuid/sysdep.c +++ b/upnp/src/uuid/sysdep.c @@ -18,14 +18,16 @@ */ #include "config.h" -#ifdef WIN32 - #include -#else /* WIN32 */ - #include -#endif /* WIN32 */ + + +#include "sysdep.h" + + +#include "UpnpInet.h" + + #include #include -#include "sysdep.h" /*-----------------------------------------------------------------------------*/ /* @@ -35,7 +37,7 @@ void get_ieee_node_identifier(uuid_node_t *node) { - char seed[16]; + unsigned char seed[16]; static int inited = 0; static uuid_node_t saved_node; @@ -140,7 +142,7 @@ get_system_time(uuid_time_t *uuid_time) /*-----------------------------------------------------------------------------*/ void -get_random_info(char seed[16]) +get_random_info(unsigned char seed[16]) { MD5_CTX c; typedef struct { @@ -159,7 +161,7 @@ get_random_info(char seed[16]) /* MD5 it */ MD5Init(&c); - MD5Update(&c, &r, sizeof r); + MD5Update(&c, (unsigned char *)&r, sizeof r); MD5Final(seed, &c); }; diff --git a/upnp/src/uuid/uuid.c b/upnp/src/uuid/uuid.c index 06bae39..5861976 100644 --- a/upnp/src/uuid/uuid.c +++ b/upnp/src/uuid/uuid.c @@ -320,7 +320,7 @@ uuid_create_from_name( uuid_upnp * uid, /* resulting UUID */ net_nsid.time_hi_and_version=htons( net_nsid.time_hi_and_version ); MD5Init( &c ); - MD5Update( &c, &net_nsid, sizeof( uuid_upnp ) ); + MD5Update( &c, (unsigned char *)&net_nsid, sizeof(uuid_upnp) ); MD5Update( &c, name, namelen ); MD5Final( hash, &c );