From noreply at bugs.horde.org Wed Feb 19 09:05:14 2025 From: noreply at bugs.horde.org (noreply at bugs.horde.org) Date: Wed, 19 Feb 2025 09:05:14 +0000 Subject: [Tickets #15101] Re: Infinite loop feof() and fread() addAttachmentFromPart In-Reply-To: References: Message-ID: <20250219090514.Horde.FplxVITFqYhIgkK8ZEmEVDp@bugs.horde.org> BITTE NICHT AUF DIESE NACHRICHT ANTWORTEN. NACHRICHTEN AN DIESE E-MAIL-ADRESSE WERDEN NICHT GELESEN. Ticket-URL: https://bugs.horde.org/ticket/15101 ------------------------------------------------------------------------------ Ticket | 15101 Aktualisiert Von | michael.menge at uni-tuebingen.de Zusammenfassung | Infinite loop feof() and fread() addAttachmentFromPart Warteschlange | IMP Version | 6.2.27 Typ | Bug Status | Unconfirmed Priorität | 2. Medium Milestone | Patch | Zuständige | ------------------------------------------------------------------------------ michael.menge at uni-tuebingen.de (2025-02-19 09:05) hat geschrieben: 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)); } From noreply at bugs.horde.org Wed Feb 19 11:44:11 2025 From: noreply at bugs.horde.org (noreply at bugs.horde.org) Date: Wed, 19 Feb 2025 11:44:11 +0000 Subject: [Tickets #15101] Re: Infinite loop feof() and fread() addAttachmentFromPart In-Reply-To: References: Message-ID: <20250219114411.Horde.vg7jrprgbBN9iqW3UejOSBH@bugs.horde.org> BITTE NICHT AUF DIESE NACHRICHT ANTWORTEN. NACHRICHTEN AN DIESE E-MAIL-ADRESSE WERDEN NICHT GELESEN. Ticket-URL: https://bugs.horde.org/ticket/15101 ------------------------------------------------------------------------------ Ticket | 15101 Aktualisiert Von | michael.menge at uni-tuebingen.de Zusammenfassung | Infinite loop feof() and fread() addAttachmentFromPart Warteschlange | IMP Version | 6.2.27 Typ | Bug Status | Unconfirmed Priorität | 2. Medium Milestone | Patch | Zuständige | +Neuer Anhang | imp-15101-infinite-loop.patch ------------------------------------------------------------------------------ michael.menge at uni-tuebingen.de (2025-02-19 11:44) hat geschrieben: 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. michael.menge at uni-tuebingen.de (2025-02-19 11:44) hat hochgeladen: imp-15101-infinite-loop.patch https://bugs.horde.org/h/services/download/?app=whups&actionID=download_file&file=imp-15101-infinite-loop.patch&ticket=15101&fn=%2Fimp-15101-infinite-loop.patch