mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-30 02:33:07 +03:00
uglify
This commit is contained in:
parent
ffbaa6523d
commit
37a7c601cc
|
@ -14,13 +14,16 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import atheris_no_libfuzzer as atheris
|
||||
import sys
|
||||
import os
|
||||
import io
|
||||
import os
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
import atheris_no_libfuzzer as atheris
|
||||
|
||||
from PIL import Image, ImageFile, ImageFilter
|
||||
|
||||
|
||||
def TestOneInput(data):
|
||||
try:
|
||||
with Image.open(io.BytesIO(data)) as im:
|
||||
|
@ -33,13 +36,14 @@ def TestOneInput(data):
|
|||
return
|
||||
return
|
||||
|
||||
|
||||
def main():
|
||||
ImageFile.LOAD_TRUNCATED_IMAGES = True
|
||||
warnings.filterwarnings("ignore")
|
||||
warnings.simplefilter('error', Image.DecompressionBombWarning)
|
||||
warnings.simplefilter("error", Image.DecompressionBombWarning)
|
||||
atheris.Setup(sys.argv, TestOneInput, enable_python_coverage=True)
|
||||
atheris.Fuzz()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user