bugfindutils - Bugs: bug #18320, Zero bytes in input should give...

 
 

bug #18320: Zero bytes in input should give warning

Submitter:  Ed Avis <epaepa>
Submitted:  Fri 17 Nov 2006 05:15:03 PM UTC
   
 
Category:  xargs Severity:  2 - Minor
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Open/Closed:  Closed
Release:  4.2.27 Fixed Release:  4.3.3
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 24 Feb 2007 02:16:31 PM UTC, comment #1: 

Fixed in CVS code for findutils 4.3.x.

James Youngman <jay>
Group administrator
Fri 17 Nov 2006 05:15:03 PM UTC, original submission:  

In Unix, command line arguments passed to a process are NUL-terminated.  So it is not possible for an argument string to contain a NUL character.  xargs ought to warn about this.  To reproduce:

% perl -e 'print "a", chr(0), "b"' | xargs echo

Actual result: echo prints 'a' on the console

Desired result: xargs gives a warning something like

NUL character found in input, cannot be passed through to argument list (did you mean to use the -0 flag?)

For backwards compatibility, xargs could do what it effectively does now and truncate the argument at the first NUL byte.  But it shouldn't do so silently.

More exotic solutions would be to strip out the NULs, or treat them as whitespace, but I don't think this is justified.

Ed Avis <epaepa>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jay (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-04-15 jay Open/ClosedOpen Closed
        Fixed ReleaseNone 4.3.3
    2007-02-24 jay Severity3 - Normal 2 - Minor
        StatusNone Fixed
        Assigned toNone jay

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code