[BusyBox 0000642]: support NUL input bytes in awk

bugs at busybox.net bugs at busybox.net
Tue Feb 14 16:06:28 UTC 2006


The following issue has been CLOSED 
====================================================================== 
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:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             01-13-2006 17:22 PST
Last Modified:              02-14-2006 08:06 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.
====================================================================== 

---------------------------------------------------------------------- 
 landley - 02-14-06 08:06  
---------------------------------------------------------------------- 
svn 14013 

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         
02-14-06 08:06  landley        Status                   assigned => closed  
02-14-06 08:06  landley        Note Added: 0001097                          
======================================================================




More information about the busybox-cvs mailing list