[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug inetlib/30118] New: Bug in gnu inetlib nntp LineIterator
From: |
mikkotommila at netscape dot net |
Subject: |
[Bug inetlib/30118] New: Bug in gnu inetlib nntp LineIterator |
Date: |
8 Dec 2006 10:36:19 -0000 |
I think I have found a bug in the gnu.inet.nntp.LineIterator class. It seems to
get occasionally stuck in an infinite loop in the readToEOF() method.
Looking at the code it seems like this is possible because readToEOF() calls
doRead() without resetting the doneRead flag.
The bug can be reproduced e.g. with this simple test class (change the news
server name to some valid server):
import java.io.IOException;
import gnu.inet.nntp.LineIterator;
import gnu.inet.nntp.NNTPConnection;
public class Test
{
public static void main(String[] args)
throws IOException
{
NNTPConnection connection = new NNTPConnection("news.server.com");
connection.help();
connection.group("alt.test");
connection.quit();
}
}
I think it could be fixed by changing readToEOF() to:
public void readToEOF()
throws IOException
{
doRead();
while (current != null)
{
doneRead = false;
doRead();
}
}
--
Summary: Bug in gnu inetlib nntp LineIterator
Product: classpath
Version: unspecified
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: inetlib
AssignedTo: dog at gnu dot org
ReportedBy: mikkotommila at netscape dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30118
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug inetlib/30118] New: Bug in gnu inetlib nntp LineIterator,
mikkotommila at netscape dot net <=