[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] [PATCH] evbuffer_search_range fails when searching the last byte
- To: libevent-users@xxxxxxxxxxxxx
- Subject: [Libevent-users] [PATCH] evbuffer_search_range fails when searching the last byte
- From: Nir Soffer <nirsof@xxxxxxxxx>
- Date: Tue, 7 Jun 2011 03:37:28 +0300
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Mon, 06 Jun 2011 20:37:39 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:from:to:content-type:mime-version :subject:date:x-mailer; bh=2k2BrghlXKC9QwpY1zLJsIcC/1+sMKUGmEsQiGyt/C4=; b=lzHJXLu4YjHbbhE2815sXfxeNV2ttxJEUuBsBR6Cu6UHwZ2JuNiKLmnd8mQgimr6Sh oDwcvuYMXTNqukGCrW0tBuaIQBg4YZ/7ChCjeWgTYvfqLKhOJ8dSiMrxwSv/2jcq87Bm uSAPCGq+3FuNfZ1cMVZVz9UEY29ZcCC0wo71U=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:mime-version:subject:date:x-mailer; b=FSnqZgMowtI+MRtv1AzbBmeHIXpXqyVXVU2SFJuIFiPmzQpt9KvRoGJr553cNYlUnG 2hgHP4zeYx8h+stsvelU5xEsQ4mNj3dJJZ09RUJAkutHuaq11R+vaWvsd0miAgHYkFCK SfaLZMOKLzUXZeMQGIcXvLlGOHJsDlRZ3iZKA=
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
Hi,
I found that evbuffer_search_range fails when you try search the last
byte with a non null end pointer.
You can work around this by checking the buffer length and calling
evbuffer_search() instead, or evbuffer_search_range with a null end
pointer.
I don't know how to fix it yet, but I added a failing test case :-)
Attachment:
0001-Add-failing-test-for-evbuffer_search_range.patch
Description: Binary data
Regards,
Nir