mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: src/string/strstr.c, src/string/wcsstr.c: wrong estimates for MIN(l,63)?
Date: Fri, 21 Mar 2014 18:07:45 +0100	[thread overview]
Message-ID: <20140321170745.GC27448@port70.net> (raw)
In-Reply-To: <20140321164817.GJ26358@brightrain.aerifal.cx>

* Rich Felker <dalias@aerifal.cx> [2014-03-21 12:48:17 -0400]:
> On Fri, Mar 21, 2014 at 03:07:22PM +0100, Yves Bastide wrote:
> > /* Fast estimate for MIN(l,63) */
> > size_t grow = l | 63;
> > 
> > "grow" is thus always at least 63...
> 
> If you look at how grow is used on the very next line, this should
> make sense.

the comment is wrong though
z grows by at least max(63,l) unless end-of-string is reached


  reply	other threads:[~2014-03-21 17:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-21 14:07 Yves Bastide
2014-03-21 16:48 ` Rich Felker
2014-03-21 17:07   ` Szabolcs Nagy [this message]
2014-03-21 17:44     ` Rich Felker
2014-03-21 18:10       ` Yves Bastide

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140321170745.GC27448@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).