$OpenBSD: patch-Modules_posixmodule_c,v 1.3 2009/01/01 21:03:27 djm Exp $
--- Modules/posixmodule.c.orig	Tue Oct 10 05:29:06 2006
+++ Modules/posixmodule.c	Fri Dec 26 12:27:16 2008
@@ -805,7 +805,7 @@ statresult_new(PyTypeObject *type, PyObject *args, PyO
 
 
 /* If true, st_?time is float. */
-static int _stat_float_times = 0;
+static int _stat_float_times = 1;
 
 PyDoc_STRVAR(stat_float_times__doc__,
 "stat_float_times([newval]) -> oldval\n\n\
@@ -5417,6 +5417,10 @@ posix_read(PyObject *self, PyObject *args)
 	PyObject *buffer;
 	if (!PyArg_ParseTuple(args, "ii:read", &fd, &size))
 		return NULL;
+	if (size < 0) {
+		errno = EINVAL;
+		return posix_error();
+	}
 	buffer = PyString_FromStringAndSize((char *)NULL, size);
 	if (buffer == NULL)
 		return NULL;
