mprotect() missing break patch

Jason Tishler jason@tishler.net
Fri Feb 14 19:27:00 GMT 2003


Corinna,

The attach patch adds a missing break statement that causes the
following under Windows 2000:

  347  190637 [main] vsftpd 2736 mprotect: mprotect (addr 1590000, len 4096, prot 1)
  113  191004 [main] vsftpd 2736 mprotect: -1 = mprotect (): Win32 error 87

For some reason, the above does not occur under NT 4.0.

Thanks,
Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-------------- next part --------------
Index: mmap.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/mmap.cc,v
retrieving revision 1.70
diff -u -p -r1.70 mmap.cc
--- mmap.cc	7 Feb 2003 20:57:30 -0000	1.70
+++ mmap.cc	14 Feb 2003 19:17:24 -0000
@@ -909,6 +909,7 @@ mprotect (caddr_t addr, size_t len, int 
 	break;
       case PROT_READ:
 	new_prot = PAGE_READONLY;
+	break;
       case PROT_EXEC:
 	new_prot = PAGE_EXECUTE;
 	break;
-------------- next part --------------
2003-02-14  Jason Tishler  <jason@tishler.net>

	* mmap.cc (mprotect): Add missing break.


More information about the Cygwin-patches mailing list