OK, the GNU sed didn't use the standard posix function, such as
strlen(), regexec() and so on,
it used the function are non-standard, and implemented by gnulib, which
they process the string
with an additional 'length' parameter, so the embedded NULs can be
treated like other characters.
We can check it at the following link:
http://lists.gnu.org/archive/html/sed-devel/2016-09/msg00010.html
In order to process the embedded NULs in busybox's sed, maybe we need to
rewrite many function,
I was work on it.
Thanks
//dengke
On 2016年09月26日 04:31, Denys Vlasenko wrote:
If you change something here, make sure to run testsuite
and see whether something broke
On Tue, Sep 6, 2016 at 9:20 AM, [email protected]
<[email protected]> wrote:
Hi all
In file ./libbb/get_line_from_file.c, function bb_get_chunk_from_file
contain the following:
while ((ch = getc(file)) != EOF) {
/* grow the line buffer as necessary */
if (!(idx & 0xff))
linebuf = xrealloc(linebuf, idx + 0x100);
linebuf[idx++] = (char) ch;
if (ch == '\0')
break;
if (end && ch == '\n')
break;
}
If we want to get a complete line, when it meets '\0', maybe not break,
should continue?
Thanks
//dengke
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox