$OpenBSD: patch-Lib_test_test_socket_py,v 1.2 2014/04/17 06:05:59 rpointel Exp $
--- Lib/test/test_socket.py.orig	Wed May 15 18:32:56 2013
+++ Lib/test/test_socket.py	Sat Apr  5 08:14:56 2014
@@ -4524,6 +4524,14 @@ class BufferIOTest(SocketConnectedTest):
 
     _testRecvFromIntoMemoryview = _testRecvFromIntoArray
 
+    def testRecvFromIntoSmallBuffer(self):
+        # See issue #20246.
+        buf = bytearray(8)
+        self.assertRaises(ValueError, self.cli_conn.recvfrom_into, buf, 1024)
+
+    def _testRecvFromIntoSmallBuffer(self):
+        self.serv_conn.send(MSG)
+
 
 TIPC_STYPE = 2000
 TIPC_LOWER = 200
