X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib-python/blobdiff_plain/ae68e889be24648e94d936e1aea614d2d1a0e7a8..23bff39b96e98bc1969d275bc7c43e1d6dd28429:/fdutils.pyx diff --git a/fdutils.pyx b/fdutils.pyx index 7923d44..0236caf 100644 --- a/fdutils.pyx +++ b/fdutils.pyx @@ -15,12 +15,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # mLib/Python is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with mLib/Python; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -50,7 +50,7 @@ def fdrecv(sock, unsigned size): cdef int len cdef PyObject *obj cdef int fd - buf = PyString_FromStringAndSize(NULL, len) + buf = PyString_FromStringAndSize(NULL, size) p = PyString_AS_STRING(buf) len = fdpass_recv(_getfd(sock), &fd, p, size) if len < 0: