Add gdb.Type.optimized_out method.
[deliverable/binutils-gdb.git] / binutils / bucomm.c
index b8deff50a52592d15b19b8cd81bfbca9c0775e69..06fbc462e242467fe6f15f46e8515d8ddf6b1456 100644 (file)
@@ -1,5 +1,5 @@
 /* bucomm.c -- Bin Utils COMmon code.
-   Copyright (C) 1991-2014 Free Software Foundation, Inc.
+   Copyright (C) 1991-2015 Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
 
@@ -429,8 +429,12 @@ print_arelt_descr (FILE *file, bfd *abfd, bfd_boolean verbose)
          const char *ctime_result = (const char *) ctime (&when);
          bfd_size_type size;
 
-         /* POSIX format:  skip weekday and seconds from ctime output.  */
-         sprintf (timebuf, "%.12s %.4s", ctime_result + 4, ctime_result + 20);
+         /* PR binutils/17605: Check for corrupt time values.  */
+         if (ctime_result == NULL)
+           sprintf (timebuf, _("<time data corrupt>"));
+         else
+           /* POSIX format:  skip weekday and seconds from ctime output.  */
+           sprintf (timebuf, "%.12s %.4s", ctime_result + 4, ctime_result + 20);
 
          mode_string (buf.st_mode, modebuf);
          modebuf[10] = '\0';
This page took 0.024035 seconds and 4 git commands to generate.