Include the size of the whole buffer.
Patch: Lukas Fittl
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@
1133611 13f79535-47bb-0310-9956-
ffa450edef68
guchar tmpdata[sz];
bytes = THRIFT_TRANSPORT_GET_CLASS (t->transport)->read (t->transport,
tmpdata,
- sz - sizeof (sz),
+ sz,
error);
/* add the data to the buffer */
// get the size of the frame in host and network byte order
sz_hbo = t->w_buf->len + sizeof(sz_nbo);
- sz_nbo = (gint32) htonl ((guint32) sz_hbo);
+ sz_nbo = (gint32) htonl ((guint32) t->w_buf->len);
// copy the size of the frame and then the frame itself
guchar tmpdata[sz_hbo];