evbuffer_find will search past the end of the buffer and find data
that should not exist in the buffer.  This code demonstrates the bug:

   struct evbuffer *buf;
   char *p;

   buf = evbuffer_new();
   assert(buf != NULL);

   evbuffer_add(buf, "abc", 3);
   evbuffer_drain(buf, 3);
   evbuffer_add(buf, "ab", 2);

   p = evbuffer_find(buf, "bc", 2);
   assert(p == NULL);    /* this will fail */

I don't have a patch yet, but I will send one soon.
_______________________________________________
Libevent-users mailing list
[email protected]
http://monkey.org/mailman/listinfo/libevent-users

Reply via email to