Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 16 Jan 2013 09:42:01 -0600
From: Rob Landley <>
Subject: Re: REG_STARTEND (regex)

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  


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.