From 620098571a41c265879b4b1f1666ce518c5bc98f Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Sat, 30 Sep 2023 07:54:39 +0000 Subject: [PATCH] Corrected comment priority --- src/PIL/EpsImagePlugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PIL/EpsImagePlugin.py b/src/PIL/EpsImagePlugin.py index 95af62540..be633b611 100644 --- a/src/PIL/EpsImagePlugin.py +++ b/src/PIL/EpsImagePlugin.py @@ -259,7 +259,9 @@ class EpsImageFile(ImageFile.ImageFile): if k == "BoundingBox": if v == "(atend)": reading_trailer_comments = True - elif not self._size or reading_trailer_comments: + elif not self._size or ( + trailer_reached and reading_trailer_comments + ): try: # Note: The DSC spec says that BoundingBox # fields should be integers, but some drivers