diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-01-29 15:47:52 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-01-29 15:47:52 +0000 |
commit | 2cb9c3c71b17346a9074ecde8ae66bd3f6278bd6 (patch) | |
tree | 1b97766ae18a122b4d9be3a15159c17967320edf /usr.bin | |
parent | 96260790270782f090599c24e3f8fe786a6bca43 (diff) |
apply sizeof() to the appropriate buffer in a strlcpy() call
spotted by Andrey Matveev (andrushock at korovino dot net)
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/diff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cvs/diff.c b/usr.bin/cvs/diff.c index 518eb5ca177..3ff0030da93 100644 --- a/usr.bin/cvs/diff.c +++ b/usr.bin/cvs/diff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff.c,v 1.18 2005/01/14 00:35:15 jfb Exp $ */ +/* $OpenBSD: diff.c,v 1.19 2005/01/29 15:47:51 jfb Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. * All rights reserved. @@ -605,7 +605,7 @@ cvs_diff_file(struct cvs_file *cfp, void *arg) strlcpy(path_tmp1, "/tmp/diff1.XXXXXXXXXX", sizeof(path_tmp1)); if (cvs_buf_write_stmp(b1, path_tmp1, 0600) == -1) return (-1); - strlcpy(path_tmp2, "/tmp/diff2.XXXXXXXXXX", sizeof(path_tmp1)); + strlcpy(path_tmp2, "/tmp/diff2.XXXXXXXXXX", sizeof(path_tmp2)); if (cvs_buf_write_stmp(b2, path_tmp2, 0600) == -1) { (void)unlink(path_tmp1); return (-1); |