Opened 5 years ago
Closed 5 years ago
#54036 closed defect (bug) (fixed)
PclZip throwing errors on PHP 8 - previously merged patch is incomplete
| Reported by: | DavidAnderson | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.8.1 |
| Component: | Filesystem API | Version: | 5.9 |
| Severity: | normal | Keywords: | php8 has-patch fixed-major |
| Cc: | Focuses: |
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
@
5 years ago
- Description modified (diff)
- Keywords php8 has-patch added
- Milestone Awaiting Review → 5.9
#2
@
5 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
@
5 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...
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Fix potentially invalid fread() call