Message276389
| Author |
christian.heimes |
| Recipients |
christian.heimes, martin.panter, ncoghlan, python-dev, vstinner |
| Date |
2016年09月14日.07:41:05 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1473838865.7.0.913496881423.issue27778@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Oh sorry, I looked in the wrong location and missed it.
* if (PyErr_CheckSignals() < 0) {return NULL;} does not free buffer with PyMem_Free(buffer);
* The function allocates memory once with PyMem_Malloc() and later a second time with PyBytes_FromStringAndSize(buffer, n). You can avoid the first allocation and a memcpy() with PyBytes_FromStringAndSize(NULL, n) and PyBytes_AS_STRING().
* The syscall can also raise EPERM as reported by a user on QNAP. IIRC a seccomp policy caused EPERM. |
|