From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11628 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [RFC PATCH] fix OOB reads in Xbyte_memmem Date: Thu, 29 Jun 2017 17:48:26 -0400 Message-ID: <20170629214826.GG1627@brightrain.aerifal.cx> References: <87r2y2vrsg.fsf@gmail.com> <20170629213533.18744-1-amonakov@ispras.ru> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1498772924 31552 195.159.176.226 (29 Jun 2017 21:48:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 29 Jun 2017 21:48:44 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-11641-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jun 29 23:48:41 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1dQhIi-0007lI-91 for gllmg-musl@m.gmane.org; Thu, 29 Jun 2017 23:48:36 +0200 Original-Received: (qmail 19510 invoked by uid 550); 29 Jun 2017 21:48:39 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 19480 invoked from network); 29 Jun 2017 21:48:39 -0000 Content-Disposition: inline In-Reply-To: <20170629213533.18744-1-amonakov@ispras.ru> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:11628 Archived-At: On Fri, Jun 30, 2017 at 12:35:33AM +0300, Alexander Monakov wrote: > Reported by Leah Neukirchen. > --- > Presumably the loops were written that way to get good performance even in I think they were just written as the simplest possible "looks-correct" adaptation of the strstr versions of the code. If they're good it's probably just by luck. Rich