From d1552326a4544da1e51119967d54e384327de006 Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 3 Sep 1995 05:05:31 +0000 Subject: 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. --- gnu/usr.bin/cvs/cvs/update.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gnu') 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; -- cgit v1.1