On Wed, Jul 26, 2017 at 5:00 PM, ravi chandran <[email protected]> wrote: > Hi, > I am using using libevent 2.0. Two applications are communicating each > other using unix stream sockets(named socket). In one of the application , i > am pulling up the data using evbuffer_pullup() from the received event > buffer. But i see corrupted data in it from certain offset onwards on the > received event buffer. > Each packet contain a header and a payload. The corruption is happened in > such a way that a packet data contains next packet header innformation > instead of actual data. This issue is happening very rarely. > I dont see sender application is sending the corrupted data. > > Can someone clarify whether any known issue exist in libevent in > evbuffer_pullup() or other dependant function which results in above data
Hi, Looks like you are waiting that returned buffer from evbuffer_pullup() will be null-terminated, while this is not true, and you should use evbuffer_get_length() to know the length of the buffer. *********************************************************************** To unsubscribe, send an e-mail to [email protected] with unsubscribe libevent-users in the body.
