]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Guard against strerror()==NULL
authorCharles Wilson <libtool@cwilson.fastmail.fm>
Sun, 21 Feb 2010 21:56:44 +0000 (16:56 -0500)
committerCharles Wilson <libtool@cwilson.fastmail.fm>
Sun, 21 Feb 2010 21:58:31 +0000 (16:58 -0500)
* libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src:main):
Check return value of strerror() using nonnull().
(func_emit_cwrapperexe_src:find_executable): Ditto.
(func_emit_cwrapperexe_src:chase_symlinks): Ditto.

ChangeLog
libltdl/config/ltmain.m4sh

index 9d8ced9d78d1788c93876c0226f327fbde86e03d..295123ac1d9d525674c18d40bfdb7d3ed44d1f8e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-02-21  Charles Wilson <libtool@cwilson.fastmail.fm>
+
+       Guard against strerror()==NULL
+       * libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src:main):
+       Check return value of strerror() using nonnull().
+       (func_emit_cwrapperexe_src:find_executable): Ditto.
+       (func_emit_cwrapperexe_src:chase_symlinks): Ditto.
+
 2010-02-21  Charles Wilson <libtool@cwilson.fastmail.fm>
 
        Document wrapper changes.
index 043d9809f631caa8d1a09d42b963349ae75f4a87..56b74977f5cbf63572f4382ea4fa9eaa36edd92c 100644 (file)
@@ -3192,7 +3192,7 @@ EOF
       /* failed to start process */
       lt_debugprintf (__FILE__, __LINE__,
                      "(main) failed to launch target \"%s\": %s\n",
-                     lt_argv_zero, strerror (errno));
+                     lt_argv_zero, nonnull (strerror (errno)));
       return 127;
     }
   return rval;
@@ -3348,7 +3348,7 @@ find_executable (const char *wrapper)
                  /* empty path: current directory */
                  if (getcwd (tmp, LT_PATHMAX) == NULL)
                    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
-                              strerror (errno));
+                              nonnull (strerror (errno)));
                  tmp_len = strlen (tmp);
                  concat_name =
                    XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
@@ -3373,7 +3373,8 @@ find_executable (const char *wrapper)
     }
   /* Relative path | not found in path: prepend cwd */
   if (getcwd (tmp, LT_PATHMAX) == NULL)
-    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", strerror (errno));
+    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+              nonnull (strerror (errno)));
   tmp_len = strlen (tmp);
   concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
   memcpy (concat_name, tmp, tmp_len);
@@ -3425,7 +3426,7 @@ chase_symlinks (const char *pathspec)
        {
          lt_fatal (__FILE__, __LINE__,
                    "error accessing file \"%s\": %s",
-                   tmp_pathspec, strerror (errno));
+                   tmp_pathspec, nonnull (strerror (errno)));
        }
     }
   XFREE (tmp_pathspec);