bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: serious bug in cmp from diffutils/cvs


From: Paul Eggert
Subject: Re: serious bug in cmp from diffutils/cvs
Date: Sun, 07 May 2006 20:16:38 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Jim Meyering <address@hidden> writes:

> No test suite?  Is one in the works?

It's on my list of things to do, but I admit it's been there a while.

> Do you prefer autotest-based tests?

In the past I've only used simple shell scripts.  I suppose we could
use autotest, and contributions along that line would be gratefully
accepted.  I've avoided autotest since I thought it was too
heavyweight, but I guess since I have nothing else better to offer we
might as well use it.

Thanks for the bug report and fix.  I installed the following
slightly-different fix, to make it parallel to a similar fallthrough
case elsewhere in that switch.

2006-05-07  Paul Eggert  <address@hidden>

        * src/cmp.c (cmp): Fix bug introduced in 2006-03-09 change.
        For example, "cmp <(echo b) <(echo a) > /dev/null" incorrectly
        succeeded.  Problem reported by Jim Meyering.

--- src/cmp.c   13 Mar 2006 19:11:17 -0000      1.43
+++ src/cmp.c   8 May 2006 01:41:04 -0000       1.44
@@ -536,10 +536,10 @@ cmp (void)
                  first_diff++;
                }
              while (first_diff < smaller);
-             ret = EXIT_FAILURE;
-             break;
 
+             /* Fall through.  */
            case type_no_stdout:
+             ret = EXIT_FAILURE;
              break;
            }
        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]