stats.load(self.logfn)
os.unlink(self.logfn)
+ def test_large_info(self):
+ p = self.new_profiler()
+ self.assertRaises(ValueError, p.addinfo, "A", "A" * 0xfceb)
+
def test_main():
test_support.run_unittest(HotShotTestCase)
Library
-------
+- Issue #24481: Fix possible memory corruption with large profiler info strings
+ in hotshot.
+
- Issue #24489: ensure a previously set C errno doesn't disturb cmath.polar().
- Issue #19543: io.TextIOWrapper (and hence io.open()) now uses the internal
if (len + PISIZE + self->index >= BUFFERSIZE) {
if (flush_data(self) < 0)
return -1;
+ if (len + PISIZE + self->index >= BUFFERSIZE) {
+ PyErr_SetString(PyExc_ValueError, "string too large for internal buffer");
+ return -1;
+ }
}
assert(len < INT_MAX);
if (pack_packed_int(self, (int)len) < 0)