diff options
author | David du Colombier <0intro@gmail.com> | 2011-11-30 15:20:43 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2011-11-30 15:20:43 -0500 |
commit | aac05c40926da9a9742e4eaaa1b02ea77539e223 (patch) | |
tree | 3815e7ff8ca2622b147dd685ceca3997ff7b7c67 /src/cmd/vac | |
parent | 83a5aba766bf2a2a84fe20df0d72d47a9105fdb2 (diff) | |
download | plan9port-aac05c40926da9a9742e4eaaa1b02ea77539e223.tar.gz plan9port-aac05c40926da9a9742e4eaaa1b02ea77539e223.tar.bz2 plan9port-aac05c40926da9a9742e4eaaa1b02ea77539e223.zip |
vacfs: fix segfault when no prefix specified
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5451052
Diffstat (limited to 'src/cmd/vac')
-rw-r--r-- | src/cmd/vac/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/vac/file.c b/src/cmd/vac/file.c index ac7d4a2a..8f2fd84f 100644 --- a/src/cmd/vac/file.c +++ b/src/cmd/vac/file.c @@ -1774,7 +1774,7 @@ vacfsopen(VtConn *z, char *file, int mode, ulong cachemem) char *prefix; if(vtparsescore(file, &prefix, score) >= 0){ - if(strcmp(prefix, "vac") != 0){ + if(prefix == nil || strcmp(prefix, "vac") != 0){ werrstr("not a vac file"); return nil; } |