vacfs: fix segfault when no prefix specified
R=rsc CC=plan9port.codebot http://codereview.appspot.com/5451052
This commit is contained in:
parent
83a5aba766
commit
aac05c4092
1 changed files with 1 additions and 1 deletions
|
|
@ -1774,7 +1774,7 @@ vacfsopen(VtConn *z, char *file, int mode, ulong cachemem)
|
||||||
char *prefix;
|
char *prefix;
|
||||||
|
|
||||||
if(vtparsescore(file, &prefix, score) >= 0){
|
if(vtparsescore(file, &prefix, score) >= 0){
|
||||||
if(strcmp(prefix, "vac") != 0){
|
if(prefix == nil || strcmp(prefix, "vac") != 0){
|
||||||
werrstr("not a vac file");
|
werrstr("not a vac file");
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue