mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Replaced IOError with OSError
This commit is contained in:
parent
1c57ab8429
commit
51d95add6a
|
@ -59,6 +59,6 @@ def test_fuzz_fonts(path):
|
||||||
fuzzers.fuzz_font(f.read())
|
fuzzers.fuzz_font(f.read())
|
||||||
except (Image.DecompressionBombError,
|
except (Image.DecompressionBombError,
|
||||||
Image.DecompressionBombWarning,
|
Image.DecompressionBombWarning,
|
||||||
IOError):
|
OSError):
|
||||||
pass
|
pass
|
||||||
assert True
|
assert True
|
||||||
|
|
|
@ -17,6 +17,6 @@ class TestFontCrash:
|
||||||
|
|
||||||
@skip_unless_feature("freetype2")
|
@skip_unless_feature("freetype2")
|
||||||
def test_segfault(self):
|
def test_segfault(self):
|
||||||
with pytest.raises(IOError):
|
with pytest.raises(OSError):
|
||||||
font = ImageFont.truetype("Tests/fonts/fuzz_font-5203009437302784")
|
font = ImageFont.truetype("Tests/fonts/fuzz_font-5203009437302784")
|
||||||
self._fuzz_font(font)
|
self._fuzz_font(font)
|
||||||
|
|
|
@ -923,7 +923,7 @@ font_render(FontObject *self, PyObject *args) {
|
||||||
|
|
||||||
// Null buffer, is dereferenced in FT_Bitmap_Convert
|
// Null buffer, is dereferenced in FT_Bitmap_Convert
|
||||||
if (!bitmap.buffer && bitmap.rows) {
|
if (!bitmap.buffer && bitmap.rows) {
|
||||||
PyErr_SetString(PyExc_IOError, "Bitmap missing for glyph");
|
PyErr_SetString(PyExc_OSError, "Bitmap missing for glyph");
|
||||||
goto glyph_error;
|
goto glyph_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user