From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2628 Path: news.gmane.org!not-for-mail From: Rob Landley Newsgroups: gmane.linux.lib.musl.general Subject: Re: REG_STARTEND (regex) Date: Wed, 16 Jan 2013 09:42:01 -0600 Message-ID: <1358350921.32505.33@driftwood> References: <20130115184513.GZ20323@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; DelSp=Yes; Format=Flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1358355024 23757 80.91.229.3 (16 Jan 2013 16:50:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Jan 2013 16:50:24 +0000 (UTC) Cc: musl@lists.openwall.com To: musl@lists.openwall.com Original-X-From: musl-return-2628-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jan 16 17:50:41 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TvWCB-00010S-Uo for gllmg-musl@plane.gmane.org; Wed, 16 Jan 2013 17:50:36 +0100 Original-Received: (qmail 28602 invoked by uid 550); 16 Jan 2013 16:50:19 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 28594 invoked from network); 16 Jan 2013 16:50:18 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:date:from:subject:to:cc:in-reply-to:x-mailer:message-id :mime-version:content-type:content-disposition :content-transfer-encoding:x-gm-message-state; bh=kuZ9GtMT5sRQ3/vZQtPSlESk5JTXr+dxZmjE7R1AO6c=; b=kQrjwNy8mh97DSWwtlTzl9BIbQ6nH0YdK9irfRSAvlMtTb0BVJeC4EVii6JNB3uBMb Xo3M4mBlwx2+nGuD/VaVEEjFkZ4xIjNG/CTqDd9PnBSeGQcLbE5XGu4hn5o2vRW2XOEp slAb7rvw4/I8boHxiTuihpOD5oU9yHJB7/jsYgVJfdnk/9ukOuu5VgDYc4sW4thzPl4O mAT13iheWaaKltnzhQkw52zgVeaF02998f9DPYNgP5tRbgil2SWC+mF05FDtVjNipfg9 KLj9/0A2O9fRTotCX/GaJmA27o5pg64UmlpUice9nzSbkycH+J0heqrviyN2SsOD4Jwk kOUg== X-Received: by 10.182.226.74 with SMTP id rq10mr1391136obc.32.1358355006993; Wed, 16 Jan 2013 08:50:06 -0800 (PST) In-Reply-To: <20130115184513.GZ20323@brightrain.aerifal.cx> (from dalias@aerifal.cx on Tue Jan 15 12:45:13 2013) X-Mailer: Balsa 2.4.11 Content-Disposition: inline X-Gm-Message-State: ALoCoQkOKjAB2kr7nXiYgIXryYGYmVwc5L4diGwn1BAPIzVAF9rACrsX/6TQkv45mDUQvGS9t92q Xref: news.gmane.org gmane.linux.lib.musl.general:2628 Archived-At: On 01/15/2013 12:45:13 PM, Rich Felker wrote: > > Does anyone have suggestions on how this can be modified to be able =20 > to > > use it with musl. >=20 > 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. =20 (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 =20 processed, not embedded nuls in the pattern space. So it's merely =20 creepy rather than outright pathological. And the caller can wrap the =20 regex library to do its own strlen stuff and restart right after the =20 embedded NUL if there's data left. (Which was on the todo list for =20 busybox sed back when Bruce happened, possibly Denys has implemented it =20 since.) Rob=