Summary: | knode hangs on XOVER error | ||
---|---|---|---|
Product: | [Unmaintained] knode | Reporter: | Arkadiusz Miskiewicz <arekm> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Unspecified | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | fix from problem 1 |
Description
Arkadiusz Miskiewicz
2009-12-11 10:39:47 UTC
add to 1) GROUP alt.pl.edonkey2000 211 0 8 7 alt.pl.edonkey2000 group reply is correct and is correctly parsed as far as I can see, so it looks like the problem lives in the "first" parameter. grpinfo for that group was: UseDefaultExpConf=true count=0 crosspostIDBuffer= defaultChSet= description= doExpire=true dynDataFormat=1 expInterval=5 firstMsg=4 groupname=alt.pl.edonkey2000 lastExpire=2005,3,6,0,0,0 lastMsg=0 name= read=0 readDays=10 removeUnavailable=true saveThreads=true status=postingAllowed unreadDays=15 useCharset=false first = qMax( first, firstSerNum ); if ( max > 0 && lastSerNum - first > max ) { DBG << "first = " << lastSerNum << " - " << max << " + 1"; first = lastSerNum - max + 1; } in kdepimlibs-4.3.4/kioslave/nntp/nntp.cpp ends up doing this: first = 514 - 1000 + 1 where first is unsigned long... thus we end up which crappy value. Created attachment 39003 [details]
fix from problem 1
SVN commit 1062490 by otrichet: kio_nntp could send a broken XOVER request to the server and hang on an error answer. This corrects the broken request. Thanks to Arkadiusz Miskiewicz for the analysis. Arkadiusz, I change your patch because the real integer overflow is in the test "lastSerNum - first > max". Because lastSerNum and first are "unsigned long", when "lastSerNum" is inferior to "first", the computation of "lastSerNum - first" overflow and give a big long and as a consequence the test succeeds. CCBUG: 218253 M +5 -0 nntp.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1062490 SVN commit 1062491 by otrichet: Report error when the result of an XOVER command is an error BUG: 218253 M +3 -1 nntp.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1062491 |