The format string supplied to error() in the code below has three "%s"
formats, but only receives two arguments.  This triggered a core dump
under Solaris 7.

This code is from copy_internal() in src/copy.c around line 606 in
fileutils-4.0.

      /* Avoid damaging the destination filesystem by refusing to preserve
         hard-linked directories (which are found at least in Netapp snapshot
         directories).  */
      if (S_ISDIR (src_type))
        {
          error (0, 0, _("%s: won't create hard link `%s' to directory `%s'"),
                 dst_path, earlier_file);
          goto un_backup;
        }

Info the texinfo manual tells me to include:

Version number: fileutils 4.0
Machine architecture: sparc
Repeat by: 

$ touch a b c
$ mkdir d
$ mv a b d c d
mv: d/d/a: won't create hard link `d/d' to directory `Segmentation Fault (core dumped)

I expected an error message, not half an error message and a core
dump.  (Actually, the "repeat by" is a simplification of what I did
type.  I didn't expect an error message, but I did deserve one for
giving such a stupid command.  Maybe I even deserved to get a core
dump. :-)

                /ceder

_______________________________________________
Bug-fileutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-fileutils

Reply via email to