From 608eba4889ad78d3befe7e03314baac8d7014012 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sun, 3 Sep 1995 05:05:31 +0000 Subject: [PATCH] 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(-) diff --git a/gnu/usr.bin/cvs/cvs/update.c b/gnu/usr.bin/cvs/cvs/update.c index d564f6432d2..f45c1a93205 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;