Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2009-05-04 22:51:08 +0400
committerChristopher Faylor <me@cgf.cx>2009-05-04 22:51:08 +0400
commit3227665e1995fe103b31d17fd4a2cddcd6cdde97 (patch)
treedde7eb8a3579cf020ac2c4f57a840f6f4d18329e /winsup/utils
parent143cb0bed5619b937e66c87bd41dcda7baa39da4 (diff)
* cygcheck.cc (find_app_on_path): Avoid using NULL pointer if find_on_path
doesn't find the app on the path.
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/cygcheck.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index c3e9a953c..3b3860369 100644
--- a/winsup/utils/cygcheck.cc
+++ b/winsup/utils/cygcheck.cc
@@ -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,