summaryrefslogtreecommitdiff
path: root/sysutils/oak/patches/patch-ac
blob: a52c4899f9aa869ed1203331b55f88cc81c04a14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$NetBSD: patch-ac,v 1.1.1.1 2007/11/03 14:28:21 rillig Exp $

--- global.c	2005-02-27 12:54:53.000000000 -0600
+++ global.c	2006-02-04 14:38:45.000000000 -0600
@@ -48,7 +50,7 @@
 
 void oak_global_set_logfile(oak_global *g, char *filename)
 {
-  strcpy(g->logfile, filename);
+  strncpy(g->logfile, filename, sizeof(g->logfile)-1);
 }
 
 oak_queuelist *oak_global_get_queuelist(oak_global *g)
@@ -113,7 +115,7 @@
 
 void oak_global_set_replacestr(oak_global *g, char *in)
 {
-  strcpy(g->replacestr, in);
+  strncpy(g->replacestr, in, sizeof(g->replacestr)-1);
 }
 
 int oak_global_host_is_ok(oak_global *g, char *host)