aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mono/strncat-process-c.patch
blob: b80fb30d859ec1ad7b90aec82f5fd49eb7049436 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- ./mono/metadata/process.c	2015-08-26 12:42:25.000000000 +0300
+++ ./mono/metadata/process.c	2015-08-29 15:49:25.369632846 +0300
@@ -380,7 +380,7 @@ static MonoObject* get_process_module (M
 	char filename [80] = "[In Memory] ";
 	const char *modulename = assembly->aname.name;

-	strncat (filename, modulename, 80);
+	strncat (filename, modulename, sizeof(filename)-strlen(filename)-1);

 	/* Build a System.Diagnostics.ProcessModule with the data.
 	 */