Browse code

Use MAP_PRIVATE

git-svn: trunk@2152

Nigel Horne authored on 2006/07/31 18:19:52
Showing 1 changed files
... ...
@@ -18,6 +18,9 @@
18 18
  *
19 19
  * Change History:
20 20
  * $Log: binhex.c,v $
21
+ * Revision 1.22  2006/07/31 09:19:52  njh
22
+ * Use MAP_PRIVATE
23
+ *
21 24
  * Revision 1.21  2006/07/01 16:17:35  njh
22 25
  * Added destroy flag
23 26
  *
... ...
@@ -79,7 +82,7 @@
79 79
  * First draft of binhex.c
80 80
  *
81 81
  */
82
-static	char	const	rcsid[] = "$Id: binhex.c,v 1.21 2006/07/01 16:17:35 njh Exp $";
82
+static	char	const	rcsid[] = "$Id: binhex.c,v 1.22 2006/07/31 09:19:52 njh Exp $";
83 83
 
84 84
 #include "clamav.h"
85 85
 
... ...
@@ -139,7 +142,7 @@ cli_binhex(const char *dir, int desc)
139 139
 	if(m == NULL)
140 140
 		return CL_EMEM;
141 141
 
142
-	start = buf = mmap(NULL, size, PROT_READ, MAP_SHARED, desc, 0);
142
+	start = buf = mmap(NULL, size, PROT_READ, MAP_PRIVATE, desc, 0);
143 143
 	if(buf == MAP_FAILED) {
144 144
 		messageDestroy(m);
145 145
 		return CL_EMEM;