summaryrefslogtreecommitdiff
blob: dca1f2a458bee6b246c6ce9a1bf6526935fadce5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff -urN lha-114i/src/lhext.c lha-114i.lhext/src/lhext.c
--- lha-114i/src/lhext.c	2000-10-04 23:57:38.000000000 +0900
+++ lha-114i.lhext/src/lhext.c	2004-05-20 01:06:41.000000000 +0900
@@ -207,9 +207,11 @@
 	}
 
 	if (extract_directory)
-		sprintf(name, "%s/%s", extract_directory, q);
-	else
-		strcpy(name, q);
+		snprintf(name, sizeof(name), "%s/%s", extract_directory, q);
+	else {
+		strncpy(name, q, sizeof(name));
+		name[sizeof(name) - 1] = '\0';
+	}
 
 
 	/* LZHDIRS_METHOD����ĥإå�������å����� */