diff options
author | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2008-05-30 16:14:35 +0000 |
---|---|---|
committer | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2008-05-30 16:14:35 +0000 |
commit | db2bd6a0d21e9a33f3de50b7b975afadd032cb5f (patch) | |
tree | 96a3fe11dbb88bf2f4e06a5077459363422ba7e7 /usr.bin/cvs/update.c | |
parent | 91087393bd468446ebf5e55ab93e4c6dd41a42d1 (diff) |
Keyword expansion must not be set if no RCS file is available, for example
a newly added but not yet committed file. Fixes segfault.
ok joris
Diffstat (limited to 'usr.bin/cvs/update.c')
-rw-r--r-- | usr.bin/cvs/update.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cvs/update.c b/usr.bin/cvs/update.c index cb7ef94bb87..7b80811e47c 100644 --- a/usr.bin/cvs/update.c +++ b/usr.bin/cvs/update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: update.c,v 1.145 2008/05/23 09:46:45 tobias Exp $ */ +/* $OpenBSD: update.c,v 1.146 2008/05/30 16:14:34 tobias Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -339,7 +339,7 @@ cvs_update_local(struct cvs_file *cf) cvs_file_classify(cf, tag); - if (kflag) + if (kflag && cf->file_rcs != NULL) rcs_kwexp_set(cf->file_rcs, kflag); if ((cf->file_status == FILE_UPTODATE || |