diff options
author | Russ Cox <rsc@swtch.com> | 2008-05-08 16:20:19 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2008-05-08 16:20:19 -0400 |
commit | 5d32c407ba9b6563dd3fc1f594e268a102691c26 (patch) | |
tree | 0b23be002dafe5353bb2da3e6a0d7fad49dc2060 /src/cmd/acme | |
parent | a2660887c0d607989b8a50822d8882140072a6a5 (diff) | |
download | plan9port-5d32c407ba9b6563dd3fc1f594e268a102691c26.tar.gz plan9port-5d32c407ba9b6563dd3fc1f594e268a102691c26.tar.bz2 plan9port-5d32c407ba9b6563dd3fc1f594e268a102691c26.zip |
acme: fix mtpt crash (Tim Wiess)
Diffstat (limited to 'src/cmd/acme')
-rw-r--r-- | src/cmd/acme/acme.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/acme/acme.c b/src/cmd/acme/acme.c index 07ce503a..37cce3f7 100644 --- a/src/cmd/acme/acme.c +++ b/src/cmd/acme/acme.c @@ -1068,6 +1068,9 @@ ismtpt(char *file) { int n; + if(mtpt == nil) + return 0; + /* This is not foolproof, but it will stop a lot of them. */ n = strlen(mtpt); return strncmp(file, mtpt, n) == 0 && ((n > 0 && mtpt[n-1] == '/') || file[n] == '/' || file[n] == 0); |