aboutsummaryrefslogtreecommitdiff
path: root/graphics/xli/patch-ac
blob: 60d8da122f8b3ce2c1db32b17f2da1ce21884de3 (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.3 2005/03/21 15:19:28 salo Exp $

--- faces.c.orig	2005-02-28 01:42:39.000000000 +0100
+++ faces.c	2005-03-21 16:08:17.000000000 +0100
@@ -54,9 +54,15 @@
     if (! strcmp(buf, "\n"))
       break;
     if (!strncmp(buf, "FirstName:", 10))
-      strcpy(fname, buf + 11);
+      {
+	strncpy(fname, buf + 11, BUFSIZ - 1);
+	fname[BUFSIZ - 1] = '\0';
+      }
     else if (!strncmp(buf, "LastName:", 9))
-      strcpy(lname, buf + 10);
+      {
+	strncpy(lname, buf + 10, BUFSIZ - 1);
+	lname[BUFSIZ - 1] = '\0';
+      }
     else if (!strncmp(buf, "Image:", 6)) {
       if (sscanf(buf + 7, "%d%d%d", &iw, &ih, &id) != 3) {
 	fprintf(stderr,"facesLoad: %s - Bad image\n", name);