artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ca9617
)
Do not rename a buffer to itself, GitHub issue 4181.
author
nicm
<nicm@openbsd.org>
Sat, 12 Oct 2024 08:13:52 +0000
(08:13 +0000)
committer
nicm
<nicm@openbsd.org>
Sat, 12 Oct 2024 08:13:52 +0000
(08:13 +0000)
usr.bin/tmux/paste.c
patch
|
blob
|
history
diff --git
a/usr.bin/tmux/paste.c
b/usr.bin/tmux/paste.c
index
27f61a1
..
f7993ff
100644
(file)
--- a/
usr.bin/tmux/paste.c
+++ b/
usr.bin/tmux/paste.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: paste.c,v 1.4
6 2023/02/07 10:56:04
nicm Exp $ */
+/* $OpenBSD: paste.c,v 1.4
7 2024/10/12 08:13:52
nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@
-241,6
+241,8
@@
paste_rename(const char *oldname, const char *newname, char **cause)
}
pb_new = paste_get_name(newname);
+ if (pb_new == pb)
+ return (0);
if (pb_new != NULL)
paste_free(pb_new);