OSSP CVS Repository |
|
The zero-terminating is done on the wrong buffer... I'll attach a patch!
|
2005-May-31 15:08:15 by anonymous:
I didn't find any "attach" function so I provide the patch here:--- xds-0.9.1/xds_engine_xdr.c 2004-09-12 19:24:34.000000000 +0200 +++ xds-0.9.1-patched/xds_engine_xdr.c 2005-05-31 14:30:06.388110990 +0200 @@ -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'; + ((xds_uint8_t *)*p)[p_len] = '\0'; return XDS_OK; }
2005-May-31 15:17:47 by anonymous:
Simpler patch:--- xds-0.9.1/xds_engine_xdr.c 2004-09-12 19:24:34.000000000 +0200 +++ xds-0.9.1-patched/xds_engine_xdr.c 2005-05-31 15:15:07.550781769 +0200 @@ -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; }
|
Type: code Version: 0.9.1 Status: fixed Created: 2005-May-31 15:06 Severity: 1 Last Change: 2005-Jun-02 20:43 Priority: 3 Subsystem: xds Assigned To: Derived From: Creator: anonymous
2005-Jun-02 20:43 | • | Check-in [5082]: Fix XDR string decoding function by NUL terminating the target buffer (instead of the source buffer). Submitted by: Unknown <ossp@jm.2good.nu> (By rse) |