Opened 4 years ago
Closed 4 years ago
#54036 closed defect (bug) (fixed)
PclZip throwing errors on PHP 8 - previously merged patch is incomplete
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.8.1 | Priority: | normal |
Severity: | normal | Version: | 5.9 |
Component: | Filesystem API | Keywords: | php8 has-patch fixed-major |
Focuses: | Cc: |
Description (last modified by )
The patch merged in #52018 is incomplete, and when using PclZip::add()
, you can still get fatal errors.
In UpdraftPlus (where we've had a number of affected users), the trace (from the relevant point onwards) is:
UpdraftPlus_Backup->makezip_addfiles, UpdraftPlus_PclZip->close, PclZip->add, PclZip->privAdd, PclZip->privAddFileList, PclZip->privAddFile
A patch is being attached.
Attachments (2)
Change History (8)
#1
@
4 years ago
- Description modified (diff)
- Keywords php8 has-patch added
- Milestone changed from Awaiting Review to 5.9
#2
@
4 years ago
Thanks for the patch!
I believe we should check $p_header['size']
instead of $p_entry['compressed_size']
though, as $p_entry
is not set in this method, and the value passed to fread()
is $p_header['size']
.
#3
@
4 years ago
@SergeyBiryukov Yes, sorry, that was just a copy/paste error - copied from the wrong place instead of my actual working change! New version coming up...
#4
@
4 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 51686:
Fix potentially invalid fread() call