Skip to content

Commit

Permalink
Merge branch 'obsd-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasAdam committed Oct 12, 2024
2 parents 6ddee22 + f8b56fd commit cb00e86
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd-source-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ cmd_source_file_done(struct client *c, const char *path, int error,
static void
cmd_source_file_add(struct cmd_source_file_data *cdata, const char *path)
{
char resolved[PATH_MAX];

if (realpath(path, resolved) == NULL) {
log_debug("%s: realpath(\"%s\") failed: %s", __func__,
path, strerror(errno));
} else
path = resolved;

log_debug("%s: %s", __func__, path);
cdata->files = xreallocarray(cdata->files, cdata->nfiles + 1,
sizeof *cdata->files);
Expand Down
2 changes: 2 additions & 0 deletions paste.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,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);

Expand Down

0 comments on commit cb00e86

Please sign in to comment.