|
Message-ID: <alpine.LNX.2.20.13.2012090951060.2504@monopod.intra.ispras.ru> Date: Wed, 9 Dec 2020 09:54:51 +0300 (MSK) From: Alexander Monakov <amonakov@...ras.ru> To: musl@...ts.openwall.com cc: Brooks Davis <brooks@...ebsd.org>, Brooks Davis <brooks@...-eyed-alien.net> Subject: Re: out-of-bounds reads in strstr 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. Alexander
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.