diff options
author | 2005-11-24 11:23:13 +0000 | |
---|---|---|
committer | 2005-11-24 11:23:13 +0000 | |
commit | 1dee9299a2cb5444022af4355368449d4f716af3 (patch) | |
tree | 03f2784769e410f1217a3b254cdca8d9b8ea8324 /usr.bin/cvs/diff.c | |
parent | minor knf + snprintf() return check; (diff) | |
download | wireguard-openbsd-1dee9299a2cb5444022af4355368449d4f716af3.tar.xz wireguard-openbsd-1dee9299a2cb5444022af4355368449d4f716af3.zip |
respect TMPDIR;
Diffstat (limited to 'usr.bin/cvs/diff.c')
-rw-r--r-- | usr.bin/cvs/diff.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/cvs/diff.c b/usr.bin/cvs/diff.c index 8a454b58ace..e5c31d4f2d4 100644 --- a/usr.bin/cvs/diff.c +++ b/usr.bin/cvs/diff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff.c,v 1.66 2005/11/21 15:01:10 xsa Exp $ */ +/* $OpenBSD: diff.c,v 1.67 2005/11/24 11:23:13 xsa Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. * All rights reserved. @@ -658,7 +658,8 @@ cvs_diff_local(CVSFILE *cf, void *arg) if (dap->rev2 != NULL) cvs_printf(" -r%s", dap->rev2); cvs_printf(" %s\n", diff_file); - strlcpy(path_tmp1, "/tmp/diff1.XXXXXXXXXX", sizeof(path_tmp1)); + strlcpy(path_tmp1, cvs_tmpdir, sizeof(path_tmp1)); + strlcat(path_tmp1, "/diff1.XXXXXXXXXX", sizeof(path_tmp1)); if (cvs_buf_write_stmp(b1, path_tmp1, 0600) == -1) { cvs_buf_free(b1); cvs_buf_free(b2); @@ -666,7 +667,8 @@ cvs_diff_local(CVSFILE *cf, void *arg) } cvs_buf_free(b1); - strlcpy(path_tmp2, "/tmp/diff2.XXXXXXXXXX", sizeof(path_tmp2)); + strlcpy(path_tmp2, cvs_tmpdir, sizeof(path_tmp2)); + strlcat(path_tmp2, "/diff2.XXXXXXXXXX", sizeof(path_tmp2)); if (cvs_buf_write_stmp(b2, path_tmp2, 0600) == -1) { cvs_buf_free(b2); (void)unlink(path_tmp1); |