Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.4
-
None
-
None
-
any
Description
running the following code:
client.connect("news.icm.edu.pl");
NewsgroupInfo[] grps = client.listNewsgroups();
results MalformedServerReplyException (alt.atheism 2147485259 2147483647 y)
it's because in function NNTPClient.__parseNewsgroupListEntry():
last = tokenizer.nextToken();
first = tokenizer.nextToken();
permission = tokenizer.nextToken();
try
{ lastNum = Integer.parseInt(last); firstNum = Integer.parseInt(first); result._setFirstArticle(firstNum); result._setLastArticle(lastNum); if((firstNum == 0) && (lastNum == 0)) result._setArticleCount(0); else result._setArticleCount(lastNum - firstNum + 1); }catch (NumberFormatException e)
{ return null; }lastNum and firstNum are Integer (too small for received values)