From aac05c40926da9a9742e4eaaa1b02ea77539e223 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 30 Nov 2011 15:20:43 -0500 Subject: vacfs: fix segfault when no prefix specified R=rsc CC=plan9port.codebot http://codereview.appspot.com/5451052 --- src/cmd/vac/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3