6.0.0-alpha10
5/14/25

Search Results: 118 of 173 [ <<First <Prev Next> Last>> ] [ Return to Search Results ]


[#15101] Infinite loop feof() and fread() addAttachmentFromPart
Summary Infinite loop feof() and fread() addAttachmentFromPart
Queue IMP
Queue Version 6.2.27
Type Bug
State Unconfirmed
Priority 2. Medium
Owners
Requester ssri_abo (at) u-paris2 (dot) fr
Created 03/30/2022 (1141 days ago)
Due
Updated 02/19/2025 (84 days ago)
Assigned
Resolved
Milestone
Patch No

History
02/19/2025 11:44:11 AM michael (dot) menge (at) uni-tuebingen (dot) de Comment #3
New Attachment: imp-15101-infinite-loop.patch Download
Reply to this comment
Here is an attempt to fix the problem.
The patch is for imp 6.2.27, but should also apply to FRAMEWORK_6 and master

As i am unable to reproduce the problem i could not tested this patch.
02/19/2025 09:05:14 AM michael (dot) menge (at) uni-tuebingen (dot) de Comment #2 Reply to this comment
I hit the same bug, unable to reproduce.

IMHO a solution would be to check if $stream is set before calling

         rewind($stream);
         $dest_handle = fopen($atc_file, 'w+b');
         while (!feof($stream)) {
             fwrite($dest_handle, fread($stream, 1024));
         }

03/30/2022 12:55:19 PM ssri_abo (at) u-paris2 (dot) fr Comment #1
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Infinite loop feof() and fread() addAttachmentFromPart
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
Reply to this comment
PHP 7.4.28
Horde 5.2.23

Horde log suddenly flooded by following PHP errors ( addAttachmentFromPart ) :

WARN: HORDE [imp] PHP ERROR: rewind() expects parameter 1 to be 
resource, null given [pid 29928 on line 3167 of 
"/usr/share/horde/imp/lib/Compose.php"]
WARN: HORDE [imp] PHP ERROR: feof() expects parameter 1 to be 
resource, null given [pid 29928 on line 3169 of 
"/usr/share/horde/imp/lib/Compose.php"]
WARN: HORDE [imp] PHP ERROR: fread() expects parameter 1 to be 
resource, null given [pid 29928 on line 3170 of 
"/usr/share/horde/imp/lib/Compose.php"]




Saved Queries