]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix test for error_one_per_line mode in error
authorUlrich Drepper <drepper@gmail.com>
Mon, 16 May 2011 13:10:36 +0000 (09:10 -0400)
committerUlrich Drepper <drepper@gmail.com>
Mon, 16 May 2011 13:10:36 +0000 (09:10 -0400)
ChangeLog
NEWS
misc/error.c

index a80468a9e08526f3ef00011b44865c204197a785..c04155975db36f762aead681b90c61ac20c1d4cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-05-16  Ulrich Drepper  <drepper@gmail.com>
 
+       [BZ #12766]
+       * misc/error.c (error_at_line): Ensure file_name and old_file_name
+       point to strings before performing equality test for error_one_per_line
+       mode.
+
        [BZ #11697]
        * login/programs/pt_chown.c (do_pt_chown): Always call chown.
 
diff --git a/NEWS b/NEWS
index 3fe6c9d5d31b7aec750a6d48a0437a1a70077dac..ef27e60428c7bc0bc0c354ce50306e4de85457e5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -16,7 +16,7 @@ Version 2.14
   12510, 12511, 12518, 12527, 12541, 12545, 12551, 12582, 12583, 12587,
   12597, 12601, 12611, 12625, 12626, 12631, 12650, 12653, 12655, 12660,
   12681, 12685, 12711, 12713, 12714, 12717, 12723, 12724, 12734, 12738,
-  12746
+  12746, 12766
 
 * The RPC implementation in libc is obsoleted.  Old programs keep working
   but new programs cannot be linked with the routines in libc anymore.
index 85d1cffbf931536978a0076d275d1a160b695ab9..9a73a61c74cb906e44be5e7a474f27ca12e84888 100644 (file)
@@ -1,5 +1,5 @@
 /* Error handler for noninteractive utilities
-   Copyright (C) 1990-1998, 2000-2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1990-1998, 2000-2006, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -272,7 +272,9 @@ error_at_line (int status, int errnum, const char *file_name,
 
       if (old_line_number == line_number
          && (file_name == old_file_name
-             || strcmp (old_file_name, file_name) == 0))
+             || (old_file_name != NULL
+                 && file_name != NULL
+                 && strcmp (old_file_name, file_name) == 0)))
        /* Simply return and print nothing.  */
        return;