6.0.0-beta1
7/8/25

[#13187] Imap_Client: Prevent endless loop in writeLiteral()
Summary Imap_Client: Prevent endless loop in writeLiteral()
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester thomas.jarosch (at) intra2net (dot) com
Created 05/15/2014 (4072 days ago)
Due
Updated 05/15/2014 (4072 days ago)
Assigned
Resolved 05/15/2014 (4072 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
05/15/2014 09:32:22 PM Michael Slusarz Comment #3
Assigned to Michael Slusarz
State ⇒ Resolved
Reply to this comment
Thanks. Horde_Imap_Client 2.20.0

Would be great if you could find the root cause so we can fix the 
issue rather than treat the symptoms.
05/15/2014 09:31:53 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit 2c52d885d2ea0b11af35478f643f2ac58deaeedf
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Thu May 15 15:31:16 2014 -0600

     [mms] Better error checking when writing data to the server (Bug 
#13187; Thomas Jarosch <thomas.jarosch@intra2net.com>).

  framework/Imap_Client/package.xml |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)

http://github.com/horde/horde/commit/2c52d885d2ea0b11af35478f643f2ac58deaeedf
05/15/2014 11:47:22 AM Thomas Jarosch Comment #1
Priority ⇒ 1. Low
New Attachment: 0001-Prevent-endless-loop-in-writeLiteral.patch Download
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Imap_Client: Prevent endless loop in writeLiteral()
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
writeLiteral() was stuck in an endless loop
logging this message until the HDD was full:

PHP ERROR: feof() expects parameter 1 to be resource, integer given 
[pid 24223 on line 106 of 
"/usr/share/pear/Horde/Imap/Client/Socket/Connection/Socket.php"]
PHP ERROR: fread() expects parameter 1 to be resource, integer given 
[pid 24223 on line 107 of 
"/usr/share/pear/Horde/Imap/Client/Socket/Connection/Socket.php"]

Prevent it by checking the return value of fread().
While we are at it, check the return value of rewind(), too.

The real cause of this problem is located somewhere else,
but getting stuck in an endless loop isn't nice either :)

Cheers,
Thomas

Saved Queries