diff options
author | Christopher Faylor <me@cgf.cx> | 2012-07-04 21:30:55 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-07-04 21:30:55 +0400 |
commit | ea51d3d4250a1b51efed8fc8442381041d59441d (patch) | |
tree | e9086af5c78e9d66e8317b20047a7b4367f38a3d /winsup/cygwin/dcrt0.cc | |
parent | 85b2b14e7a9cf343d287f19eb0105123a4f540b0 (diff) |
* dcrt0.cc (build_argv): Guard against NULL pointer dereference found by Clang.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index e28aecde9..70b962889 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -353,7 +353,8 @@ build_argv (char *cmd, char **&argv, int &argc, int winshell) } } - argv[argc] = NULL; + if (argv) + argv[argc] = NULL; debug_printf ("argc %d", argc); } |