]> sourceware.org Git - newlib-cygwin.git/commitdiff
* cygcheck.cc (find_app_on_path): Avoid using NULL pointer if find_on_path
authorChristopher Faylor <me@cgf.cx>
Mon, 4 May 2009 18:51:08 +0000 (18:51 +0000)
committerChristopher Faylor <me@cgf.cx>
Mon, 4 May 2009 18:51:08 +0000 (18:51 +0000)
doesn't find the app on the path.

winsup/ChangeLog
winsup/utils/cygcheck.cc

index 90322944f5b658d5653ab1dffc8355b5d3882eee..6e37e6d9146af09c8ee702f93ceac34c77b70394 100644 (file)
@@ -1,3 +1,8 @@
+2009-05-04  Christopher Faylor  <me+cygwin@cgf.cx>
+
+       * cygcheck.cc (find_app_on_path): Avoid using NULL pointer if
+       find_on_path doesn't find the app on the path.
+
 2009-02-23  Sjors Gielen <mailinglist@dazjorz.com>
 
        * Makefile.in: Add DESTDIR functionality.
index c3e9a953c762fc341da5932539368a71eb8bbc80..3b38603695e14953b3aee6ffd3ef7d8509414eb8 100644 (file)
@@ -840,6 +840,9 @@ find_app_on_path (const char *app, bool showall = false)
 {
   const char *papp = find_on_path (app, ".exe", showall, false, true);
 
+  if (!papp)
+    return NULL;
+
   wide_path wpath (papp);
   HANDLE fh =
     CreateFileW (wpath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
This page took 0.035628 seconds and 5 git commands to generate.