From ddb8cb02c0badb2465bbd5d0697268bf4d10b217 Mon Sep 17 00:00:00 2001 From: joris Date: Thu, 1 Jun 2017 08:38:56 +0000 Subject: [PATCH] If CVS_LOCK_REPO is set only attempt to unlock the repo if we're local. Otherwise we end up calling cvs_repository_unlock() with garbage from the stack if we're dealing with a remote cvsroot. --- usr.bin/cvs/file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index c9e39b222ed..527aaf0d320 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.272 2017/06/01 08:08:24 joris Exp $ */ +/* $OpenBSD: file.c,v 1.273 2017/06/01 08:38:56 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2004 Jean-Francois Brousseau @@ -372,8 +372,10 @@ cvs_file_walklist(struct cvs_flisthead *fl, struct cvs_recursion *cr) cr->fileproc(cf); if (l->flags & FILE_USER_SUPPLIED) { - if (cmdp->cmd_flags & CVS_LOCK_REPO) + if (cvsroot_is_local() && + (cmdp->cmd_flags & CVS_LOCK_REPO)) { cvs_repository_unlock(repo); + } free(cvs_directory_tag); cvs_directory_tag = NULL; } -- 2.20.1