summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-10-12 22:15:47 +0000
committerChristopher Faylor <me@cgf.cx>2000-10-12 22:15:47 +0000
commit1ec4f618feb517c020ff25784bedc66dd4f6f0e2 (patch)
treed146a1dab1ba5d6fcd6411bc85c783becac7f54a /winsup/cygwin/path.cc
parent5e0d760fb82d2d04c34306803253777aa5040fce (diff)
downloadcygnal-1ec4f618feb517c020ff25784bedc66dd4f6f0e2.tar.gz
cygnal-1ec4f618feb517c020ff25784bedc66dd4f6f0e2.tar.bz2
cygnal-1ec4f618feb517c020ff25784bedc66dd4f6f0e2.zip
* child_info: Bump child_info "version".
(child_info): Move some fields from child_info_spawn to here. * cygheap.cc: Make cygheap pointers NOCOPY. * dcrt0.cc (dll_crt0_1): Copy cygwin heap here regardless of whether we've been forked or execed. * dtable.cc (dtable::fixup_after_fork): Just release close-on-exec fds. * exceptions.cc (stackdump): Respond to C warning. * fork.cc: Reorganize to minimize stack copying. (fork_child): New function. (fork_parent): Ditto. (sync_with_child): Don't suspend the forkee. (sync_with_parent): Ditto. Make into a function. * heap.cc (heap_init): Add some debugging output. * path.cc (path_conv::check): Add an assertion. (has_suffix): Ditto. * security.cc (get_pw_sid): Defend against NULL. * sigproc.cc (proc_subproc): Fix debugging output. (wait_sig): Ditto. * strace.cc: Make statics NO_COPY throughout. (strace::vsprntf): Defend against NULL.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 3b8ff7d56..5e4e2e97f 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -70,6 +70,7 @@ details. */
#include "shared_info.h"
#include "registry.h"
#include "security.h"
+#include <assert.h>
static int normalize_win32_path (const char *src, char *dst);
static void slashify (const char *src, char *dst, int trailing_slash_p);
@@ -190,6 +191,7 @@ path_conv::check (const char *src, unsigned opt,
for (;;)
{
MALLOC_CHECK;
+ assert (src);
char *p = strrchr (src, '/');
if (p)
{
@@ -2163,6 +2165,7 @@ done:
static __inline char *
has_suffix (const char *path, const suffix_info *suffixes)
{
+ assert (path);
char *ext = strrchr (path, '.');
if (ext)
for (const suffix_info *ex = suffixes; ex->name != NULL; ex++)