Date: Wed, 9 Dec 2020 11:37:29 -0500 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: out-of-bounds reads in strstr On Wed, Dec 09, 2020 at 09:54:51AM +0300, Alexander Monakov wrote: > On Tue, 8 Dec 2020, Rich Felker wrote: > > > > That being said. I'm still confused by the comment in strstr. `l | 63` > > > is closer to `MAX(l,63)` than `MIN(l,63)`. > > > > Yes, the comment is wrong. The point is just to scan at least l bytes > > forward for the end of the haystack (since we'll need that many > > immediately) and at least some decent minimum to avoid doing it over > > and over if the needle is short. But there's no need for it to be > > precise. > > It's not the first time this comes up. I suspect you'd save more time > correcting the misleading comment instead of responding to each inquiry > individually. Thanks for poking me again about this. Will do. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.