--- a/src/active.c +++ b/src/active.c @@ -435,14 +435,15 @@ do_read_newsrc_active_file( char fmt[25]; snprintf(fmt, sizeof(fmt), "%%"T_ARTNUM_SFMT" %%"T_ARTNUM_SFMT" %%"T_ARTNUM_SFMT" %%%ds", NNTP_GRPLEN); + if (sscanf(line, fmt, &count, &min, &max, ngname) != 4) { # ifdef DEBUG - if ((debug & DEBUG_NNTP) && verbose > 1) { - if (sscanf(line, fmt, &count, &min, &max, ngname) != 4) - debug_print_file("NNTP", "Invalid response to \"GROUP %s\": \"%s\"", ngnames[index_o], line); - if (strcmp(ngname, ngnames[index_o]) != 0) - debug_print_file("NNTP", "Groupname mismatch in response to \"GROUP %s\": \"%s\"", ngnames[index_o], line); - } + if ((debug & DEBUG_NNTP) && verbose > 1) { + debug_print_file("NNTP", "Invalid response to \"GROUP %s\": \"%s\"", ngnames[index_o], line); + if (strcmp(ngname, ngnames[index_o]) != 0) + debug_print_file("NNTP", "Groupname mismatch in response to \"GROUP %s\": \"%s\"", ngnames[index_o], line); + } # endif /* DEBUG */ + } ptr = ngname; free(ngnames[index_o]); index_o = (index_o + 1) % NUM_SIMULTANEOUS_GROUP_COMMAND;