$OpenBSD: patch-Lib_test_test_socket_py,v 1.4 2014/07/11 06:59:43 rpointel Exp $
security fix: http://bugs.python.org/issue20246

--- Lib/test/test_socket.py.orig	Mon Jun 30 04:05:36 2014
+++ Lib/test/test_socket.py	Wed Jul  9 11:41:15 2014
@@ -1660,6 +1660,16 @@ class BufferIOTest(SocketConnectedTest):
 
     _testRecvFromIntoEmptyBuffer = _testRecvFromIntoArray
 
+    def testRecvFromIntoSmallBuffer(self):
+        # See issue #20246.
+        buf = bytearray(8)
+        self.assertRaises(ValueError, self.cli_conn.recvfrom_into, buf, 1024)
+
+    def _testRecvFromIntoSmallBuffer(self):
+        with test_support.check_py3k_warnings():
+            buf = buffer(MSG)
+        self.serv_conn.send(buf)
+
 
 TIPC_STYPE = 2000
 TIPC_LOWER = 200
