$OpenBSD: patch-io_c,v 1.1 2008/07/21 09:40:42 bernd Exp $ Fixes multiple security vulnerabilities. http://secunia.com/advisories/29794/ Patch against ruby-1.8.6p114 from: http://blog.phusion.nl/assets/r8ee-security-patch-20080623-2.txt and https://launchpad.net/ubuntu/+source/ruby1.8 1.8.6-p229 and 1.8.7-p21 will break rails applications. --- io.c.orig Tue May 22 13:28:10 2007 +++ io.c Tue Apr 14 04:42:20 2009 @@ -32,7 +32,7 @@ # define NO_LONG_FNAME #endif -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(sun) || defined(_nec_ews) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FabBSD__) || defined(__DragonFly__) || defined(sun) || defined(_nec_ews) # define USE_SETVBUF #endif @@ -4851,8 +4851,9 @@ rb_f_select(argc, argv, obj) #if !defined(MSDOS) && !defined(__human68k__) static int io_cntl(fd, cmd, narg, io_p) - int fd, cmd, io_p; + int fd, io_p; long narg; + unsigned long cmd; { int retval; @@ -4882,7 +4883,7 @@ rb_io_ctl(io, req, arg, io_p) int io_p; { #if !defined(MSDOS) && !defined(__human68k__) - int cmd = NUM2ULONG(req); + unsigned long cmd = NUM2ULONG(req); OpenFile *fptr; long len = 0; long narg = 0;