Do not rename a buffer to itself, GitHub issue 4181.

This commit is contained in:
nicm 2024-10-12 08:13:52 +00:00
parent bcc47add38
commit 2d8b6fcf23

View File

@ -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);