Bug 3939 - XHDR newsgroups command endless loop
Summary: XHDR newsgroups command endless loop
Status: RESOLVED DUPLICATE of bug 4133
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: NNTP (show other bugs)
Version: 3.16.0
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2017-12-23 02:57 UTC by Jean Diraison
Modified: 2019-01-02 20:30 UTC (History)
1 user (show)

See Also:


Attachments
Manage -1 end special value in nntp_threaded_xhdr nntp_threaded_over (159 bytes, patch)
2017-12-23 02:57 UTC, Jean Diraison
no flags Details | Diff
Manage -1 end special value in nntp_threaded_xhdr nntp_threaded_over (1.60 KB, patch)
2017-12-23 03:01 UTC, Jean Diraison
no flags Details | Diff

Description Jean Diraison 2017-12-23 02:57:40 UTC
Created attachment 1829 [details]
Manage -1 end special value in nntp_threaded_xhdr nntp_threaded_over

The XHDR newsgroups command keeps downloading data forever in some case.

This happens when nntp_threaded_xhdr() function [src/etpan/nntp-thread.c] is called with "end" parameter equal to 0xffffffff = (guint32)-1. The condition in the while loop is always true (cbeg <= end && cend <= end).

I have experienced this problem with groups where last article has been deleted (for example server: richelieu.ac-versailles.fr:119  group: ac-versailles.vie-du-reseau.discussions ).

When this occurs, the XOVER command returns no data. So "newlist" stay NULL in news_get_msginfos_for_range() function [src/news.c]. In this case, the "first" and "last" signed integers are equals to -1 in news_get_extra_fields() function, and they are converted to unsigned 32 bits integers 0xffffffff in nntp_threaded_xhdr() call [src/etpan/nntp-thread.c].



I don't know what is the best way to solve this problem:
* return from news_get_extra_fields() if msglist is NULL
* or manage -1 special case values in nntp_threaded_xhdr() to keep previous behavior (by comparing values + ones)
Comment 1 Jean Diraison 2017-12-23 03:01:23 UTC
Created attachment 1830 [details]
Manage -1 end special value in nntp_threaded_xhdr nntp_threaded_over
Comment 2 Andrej Kacian 2019-01-02 20:30:56 UTC

*** This bug has been marked as a duplicate of bug 4133 ***

Note You need to log in before you can comment on or make changes to this bug.