summaryrefslogtreecommitdiffstats
path: root/sail
diff options
context:
space:
mode:
authorapb <apb@NetBSD.org>2014-03-28 17:53:47 +0000
committerapb <apb@NetBSD.org>2014-03-28 17:53:47 +0000
commita2275b5fd1be0aa6ef4198218acf65eaf565a329 (patch)
tree2c706c78c3159ec51874b30d45b0ecc3b7cb34a2 /sail
parent8ea01d526182cefb360ddd48824173e32ee2b5f8 (diff)
downloadbsdgames-darwin-a2275b5fd1be0aa6ef4198218acf65eaf565a329.tar.gz
bsdgames-darwin-a2275b5fd1be0aa6ef4198218acf65eaf565a329.tar.zst
bsdgames-darwin-a2275b5fd1be0aa6ef4198218acf65eaf565a329.zip
temp is a pointer, and tempmax, not sizeof(temp), is the length of
the buffer that it points to. Adjust a strlcat() call to suit.
Diffstat (limited to 'sail')
-rw-r--r--sail/dr_2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sail/dr_2.c b/sail/dr_2.c
index a761fb1d..ce4c75c8 100644
--- a/sail/dr_2.c
+++ b/sail/dr_2.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dr_2.c,v 1.25 2009/03/14 22:52:52 dholland Exp $ */
+/* $NetBSD: dr_2.c,v 1.26 2014/03/28 17:53:47 apb Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)dr_2.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: dr_2.c,v 1.25 2009/03/14 22:52:52 dholland Exp $");
+__RCSID("$NetBSD: dr_2.c,v 1.26 2014/03/28 17:53:47 apb Exp $");
#endif
#endif /* not lint */
@@ -286,7 +286,7 @@ try(struct ship *f, struct ship *t,
}
if ((ma > 0 && ta > 0 && (n = str_end(temp)) != 'l' && n != 'r') ||
!strlen(temp)) {
- strlcat(temp, "l", sizeof(temp));
+ strlcat(temp, "l", tempmax);
new = score(f, t, temp, tempmax, rakeme);
if (new > *high && (!rakeme ||
(gunsbear(f, t) && !gunsbear(t, f)))) {