OSSP CVS Repository

ossp - Difference in ossp-pkg/xds/xdr-encode-string.c versions 1.1 and 1.2
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/xds/xdr-encode-string.c 1.1 -> 1.2

--- xdr-encode-string.c  2001/07/19 15:13:39     1.1
+++ xdr-encode-string.c  2001/07/20 10:07:11     1.2
@@ -50,7 +50,7 @@
 
     p       = (u_int8_t*)va_arg(*args, void*);
     assert(p != NULL);
-    p_len   = strlen(p);
+    p_len   = strlen((char*)p);
     padding = (4 - (p_len & 0x03)) & 0x03;
     assert((p_len + padding) % 4 == 0);
 
@@ -63,7 +63,7 @@
         ((u_int8_t*)buffer)[2] = (p_len >>  8) & 0x000000ff;
         ((u_int8_t*)buffer)[3] = (p_len >>  0) & 0x000000ff;
         memmove((u_int8_t*)buffer+4, p, p_len);
-        memset(buffer+4+p_len, 0, padding);
+        memset((u_int8_t*)buffer+4+p_len, 0, padding);
         }
 
     /* Done. */

CVSTrac 2.0.1