URL:
  <http://savannah.gnu.org/bugs/?18320>

                 Summary: Zero bytes in input should give warning
                 Project: findutils
            Submitted by: epaepa
            Submitted on: Friday 17/11/06 at 17:15
                Category: xargs
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 4.2.27
           Fixed Release: None

    _______________________________________________________

Details:

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.






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?18320>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-findutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-findutils

Reply via email to