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

 
 

bug #18320: Zero bytes in input should give warning

Submitted by:  Ed Avis <epaepa>
Submitted on:  Fri 17 Nov 2006 05:15:03 PM UTC  
 
Category: xargsSeverity: 2 - Minor
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Open/Closed: Closed
Release: 4.2.27Fixed Release: 4.3.3

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

Fixed in CVS code for findutils 4.3.x.

James Youngman <jay>
Project AdministratorIn charge of this item.
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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 15 Apr 2007 07:43:19 PM UTCjayOpen/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.3.3
    Sat 24 Feb 2007 02:16:31 PM UTCjaySeverity3 - Normal=>2 - Minor
      StatusNone=>Fixed
      Assigned toNone=>jay

    Back to the top


    Powered by Savane 3.1-cleanup1