OSSP CVS Repository

ossp - Check-in [5082]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 5082
Date: 2005-Jun-02 20:43:06 (local)
2005-Jun-02 18:43:06 (UTC)
User:rse
Branch:
Comment: Fix XDR string decoding function by NUL terminating the target buffer (instead of the source buffer).

Submitted by: Unknown <ossp@jm.2good.nu>

Tickets:
#61 xdr_decode_string does not zero-terminate the resulting string
Inspections:
Files:
ossp-pkg/xds/ChangeLog      1.5 -> 1.6     6 inserted, 0 deleted
ossp-pkg/xds/xds_engine_xdr.c      1.15 -> 1.16     1 inserted, 1 deleted

ossp-pkg/xds/ChangeLog 1.5 -> 1.6

--- ChangeLog    2004/09/12 17:32:14     1.5
+++ ChangeLog    2005/06/02 18:43:06     1.6
@@ -11,6 +11,12 @@
   This is a list of all source changes to OSSP xds.
   For less details please have a look at the NEWS file.
 
+  Changes between 0.9.1 and 0.9.2 (17-Sep-2004 to xx-xxx-2005)
+
+   o Fix XDR string decoding function by NUL terminating
+     the target buffer (instead of the source buffer).
+     [Unknown <ossp@jm.2good.nu>]
+
   Changes between 0.9.0 and 0.9.1 (17-Feb-2003 to 12-Sep-2004)
 
    o Fixed a few size_t/int conflicts and uninitialized value warnings.


ossp-pkg/xds/xds_engine_xdr.c 1.15 -> 1.16

--- xds_engine_xdr.c     2004/09/12 17:32:14     1.15
+++ xds_engine_xdr.c     2005/06/02 18:43:06     1.16
@@ -696,7 +696,7 @@
 
     /* Copy data into the buffer. */
     memmove(*p, (xds_uint8_t *)buffer + 4, p_len);
-    ((xds_uint8_t *)buffer)[4 + p_len] = '\0';
+    (*p)[p_len] = '\0';
 
     return XDS_OK;
 }

CVSTrac 2.0.1