diff options
author | peter <peter@FreeBSD.org> | 1995-09-03 05:05:31 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1995-09-03 05:05:31 +0000 |
commit | d1552326a4544da1e51119967d54e384327de006 (patch) | |
tree | c9af5a1ddc79bfd63372e50a90555ddbb3a10f19 /gnu | |
parent | 42b9759b7895279bcd10bf11355e7aba5fb2d425 (diff) | |
download | FreeBSD-src-d1552326a4544da1e51119967d54e384327de006.zip FreeBSD-src-d1552326a4544da1e51119967d54e384327de006.tar.gz |
Put a bandaid on the NULL pointer dereference caused by doing an
"update -jHEAD" when a file has been added on the specified tag.
It doesn't actually make cvs 'handle' it, it just stops it from dying
and leaving stray locks and other wreckage.
This was suggested by the CVS maintainers, and is in cvs-1.5.1-950901.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/cvs/cvs/update.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gnu/usr.bin/cvs/cvs/update.c b/gnu/usr.bin/cvs/cvs/update.c index d564f64..f45c1a9 100644 --- a/gnu/usr.bin/cvs/cvs/update.c +++ b/gnu/usr.bin/cvs/cvs/update.c @@ -1022,8 +1022,9 @@ join_file (file, srcfiles, vers, update_dir, entries) } } - /* skip joining identical revs */ - if (strcmp (rev2, vers->vn_user) == 0) /* no merge necessary */ + /* skip joining identical revs or if the file is not present */ + if (vers->vn_user == NULL || + strcmp (rev2, vers->vn_user) == 0) /* no merge necessary */ { free (rev2); return; |