From: Rob Landley <rob@landley.net>
To: musl@lists.openwall.com
Cc: musl@lists.openwall.com
Subject: Re: REG_STARTEND (regex)
Date: Wed, 16 Jan 2013 09:42:01 -0600 [thread overview]
Message-ID: <1358350921.32505.33@driftwood> (raw)
In-Reply-To: <20130115184513.GZ20323@brightrain.aerifal.cx> (from dalias@aerifal.cx on Tue Jan 15 12:45:13 2013)
On 01/15/2013 12:45:13 PM, Rich Felker wrote:
> > Does anyone have suggestions on how this can be modified to be able
> to
> > use it with musl.
>
> If the start position is 0, which it seems to be here, there's nothing
> to be done but removing REG_STARTEND. All it's doing is allowing you
> to process data with embedded nul bytes, which is not required by the
> standard or useful for any meaningful use of sed.
Actually people use sed to modify embedded strings in binaries.
(Strange but true.)
> Nobody will notice
> the difference with it missing unless they're trying to perform
> hideous hacks like patching binary files with sed...
Which people do.
However, mostly this involves embedded nuls in the data being
processed, not embedded nuls in the pattern space. So it's merely
creepy rather than outright pathological. And the caller can wrap the
regex library to do its own strlen stuff and restart right after the
embedded NUL if there's data left. (Which was on the todo list for
busybox sed back when Bruce happened, possibly Denys has implemented it
since.)
Rob
next prev parent reply other threads:[~2013-01-16 15:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 10:34 Daniel Cegiełka
2013-01-15 13:42 ` Rich Felker
2013-01-15 15:16 ` Daniel Cegiełka
2013-01-15 15:37 ` John Spencer
2013-01-15 15:50 ` Daniel Cegiełka
2013-01-15 16:13 ` Rob Landley
2013-01-15 18:38 ` John Spencer
2013-01-16 15:41 ` Rob Landley
2013-01-15 16:11 ` Rob Landley
2013-01-15 18:45 ` Rich Felker
2013-01-15 18:55 ` Daniel Cegiełka
2013-01-16 15:42 ` Rob Landley [this message]
2013-01-16 16:57 ` Rich Felker
2014-06-11 14:24 ` Justin Cormack
2014-06-12 1:00 ` bfdamkoehler
2014-06-12 1:40 ` Rich Felker
2014-06-13 1:15 ` bfdamkoehler
2014-06-13 3:00 ` Rich Felker
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=1358350921.32505.33@driftwood \
--to=rob@landley.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).