solved 64 bit issue in push/pop stroke interface
authorAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 31 Oct 2006 23:17:21 +0000 (23:17 -0000)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 31 Oct 2006 23:17:21 +0000 (23:17 -0000)
src/charon/threads/stroke_interface.c
src/starter/starterstroke.c
src/stroke/stroke.c

index 1561c09..5f0f567 100755 (executable)
@@ -93,14 +93,14 @@ static void pop_string(stroke_msg_t *msg, char **string)
        /* check for sanity of string pointer and string */
        if (string < (char**)msg
        ||      string > (char**)msg + sizeof(stroke_msg_t)
-       || (u_int)*string < (u_int)((char*)msg->buffer - (char*)msg)
-       || (u_int)*string > msg->length)
+       || (unsigned long)*string < (unsigned long)((char*)msg->buffer - (char*)msg)
+       || (unsigned long)*string > msg->length)
        {
                *string = "(invalid pointer in stroke msg)";
        }
        else
        {
-               *string = (char*)msg + (u_int)*string;
+               *string = (char*)msg + (unsigned long)*string;
        }
 }
 
index aae8d5b..cde9567 100644 (file)
@@ -64,7 +64,7 @@ enum auth_method_t {
 
 static char* push_string(stroke_msg_t *msg, char *string)
 {
-       u_int string_start = msg->length;
+       unsigned long string_start = msg->length;
 
        if (string == NULL || msg->length + strlen(string) >= sizeof(stroke_msg_t))
        {
index b7ee431..90fd16f 100644 (file)
@@ -34,7 +34,7 @@ struct stroke_token {
 
 static char* push_string(stroke_msg_t *msg, char *string)
 {
-       u_int string_start = msg->length;
+       unsigned long string_start = msg->length;
 
        if (string == NULL ||  msg->length + strlen(string) >= sizeof(stroke_msg_t))
        {