[BusyBox 0000642]: support NUL input bytes in awk

bugs at busybox.net bugs at busybox.net
Sat Jan 14 01:22:55 UTC 2006


The following issue has been SUBMITTED. 
====================================================================== 
http://busybox.net/bugs/view.php?id=642 
====================================================================== 
Reported By:                akvadrako
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   642
Category:                   Other
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             01-13-2006 17:22 PST
Last Modified:              01-13-2006 17:22 PST
====================================================================== 
Summary:                    support NUL input bytes in awk
Description: 
Currently awk breaks when givin a NUL input byte because it uses strchr()
to find the end of a record. Since the NUL's hide the newlines, the record
buffer grows until awk runs out of memory.  Using memchr instead avoids
this problem.

Additionally, pattern matches fail with embeded NUL's because regexec()
uses a NUL-terminated string.  The best we can do to avoid this is treat
NUL as a record seperator.

Behavior with NUL's is left undefined by SUSv3, but I believe this is the
most useful implementation.
====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
01-13-06 17:22  akvadrako      New Issue                                    
01-13-06 17:22  akvadrako      Status                   new => assigned     
01-13-06 17:22  akvadrako      Assigned To               => BusyBox         
======================================================================




More information about the busybox-cvs mailing list