Skip to content

Technically invalid test images #6878

Closed
@Yay295

Description

"illu10_no_preview.eps", "illu10_preview.eps", "illuCS6_no_preview.eps", and "illuCS6_preview.eps" all contain one line that is longer than 255 characters, which is the maximum limit according to the specification.

Page 13:

EPS files must not have lines of ASCII text that exceed 255 characters, excluding line-termination characters.

Page 25:

The hexadecimal lines must never exceed 255 bytes in length. In cases where the preview is very wide, the lines must be broken. The line breaks can be made at any even number of hex digits, because the dimensions of the finished preview are established by the width, height, and depth values.

The four image files appear to be nearly the same, and have the same long line:

<xmpGImg:image>/9j/4AAQSkZJRgABAgEASABIAAD/7QAsUGhvdG9zaG9wIDMuMAA4QklNA+0AAAAAABAASAAAAAEA&#xA;AQBIAAAAAQAB/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoK&#xA;DBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxscHx8fHx8fHx8fHwEHBwcNDA0YEBAYGhURFRofHx8f&#xA;Hx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8f/8AAEQgBAAAsAwER&#xA;AAIRAQMRAf/EAaIAAAAHAQEBAQEAAAAAAAAAAAQFAwIGAQAHCAkKCwEAAgIDAQEBAQEAAAAAAAAA&#xA;AQACAwQFBgcICQoLEAACAQMDAgQCBgcDBAIGAnMBAgMRBAAFIRIxQVEGE2EicYEUMpGhBxWxQiPB&#xA;UtHhMxZi8CRygvElQzRTkqKyY3PCNUQnk6OzNhdUZHTD0uIIJoMJChgZhJRFRqS0VtNVKBry4/PE&#xA;1OT0ZXWFlaW1xdXl9WZ2hpamtsbW5vY3R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo+Ck5SVlpeYmZ&#xA;qbnJ2en5KjpKWmp6ipqqusra6voRAAICAQIDBQUEBQYECAMDbQEAAhEDBCESMUEFURNhIgZxgZEy&#xA;obHwFMHR4SNCFVJicvEzJDRDghaSUyWiY7LCB3PSN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eZbeew0G0hjjszHq8tzbMzxPKhK87YVr6RPt06ggBJF&#xA;Mcsf+cWPOuoGQWGv+X7sxU9X0LueXjWtOXC3NK8TihF/9ChfmV/1ctG/5H3X/ZNirv8AoUL8yv8A&#xA;q5aN/wAj7r/smxVdB/zi/wDmHoF3aazPeaXcQ2NzbzPBbyXbyuBMmyKLapPsMUh9J/40m/wP/ij9&#xA;GS19L1/0fSX1OFetfSrTj8XLjxpvWm+NrW9P/9k=</xmpGImg:image>

It looks like &#xA;, an HTML encoded line feed, was added to this file instead of an actual line feed. Replacing &#xA; with \n allowed the files to load in my branch (I'm testing some changes to the EPS plugin).

The two "*_preview.eps" files also have a line that is longer than 255 characters at the end, but it looks like binary data so I think that's valid.

Currently the code only checks the line length for lines in the header, and lines after the header that start with a %. Since these test files came from the wild, we probably want to allow files like this, but I thought I'd at least document it.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions