Skip to content

Conversation

@danielkuettner
Copy link
Contributor

fix for issue with zip files as sent by email

Copy link
Owner

@synopse synopse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks weird to me.
Your "for i" loop does not change the position anymore...

Why not just change the 127 constant to 65535?

@danielkuettner
Copy link
Contributor Author

danielkuettner commented Oct 27, 2025

There were 2 issues:

  1. 1 to 127 (only) -> in our file LastHeader comes after 127
  2. Size was changed in for loop but has to be read only

Since this update on our side alle zip files are readable without an issues. But zip isn't something I'm worked with in past.

Just changing i to 65535 was my first quick and dirty approach. But without success.

@danielkuettner
Copy link
Contributor Author

Hello Arnaud,
just a info:
Since 2 weeks our fix runs under fpc/linux without issues.

Daniel

synopse pushed a commit that referenced this pull request Nov 10, 2025
- to fix some .zip content ending with a lot of zeros
- proper fix corresponding to #400
@synopse
Copy link
Owner

synopse commented Nov 10, 2025

I guess this should be OK with my above commit.
Something very close to what you propose, and I tested it too with some border cases like a .zip in an executable resource.

synopse pushed a commit that referenced this pull request Nov 10, 2025
- when file is very small
- see #400
@danielkuettner
Copy link
Contributor Author

Thanks. I will test it and inform you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants