[issue28187] Check return value of _PyBytes_Resize
Serhiy Storchaka
report at bugs.python.org
Sat Sep 17 07:00:50 EDT 2016
Serhiy Storchaka added the comment:
Could you please regenerate the patch for Rietveld Berker?
_PyBytes_Resize(&res, r) always sets res to NULL if fails. Thus the following code is correct. No need to check the return value.
if (n > r)
_PyBytes_Resize(&res, r);
return res;
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28187>
_______________________________________
More information about the Python-bugs-list
mailing list