X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Famindexd.c;h=e1e1ba10b92ea5f3e8eed2fe00cff1afd4816850;hb=c489fc6ad53e4658722b7f63fb40edc6f53c57a9;hp=708d1535fd9c806f03947a6d1adcb5832d363538;hpb=2627875b7d18858bc1f9f7652811e4d8c15a23eb;p=debian%2Famanda diff --git a/server-src/amindexd.c b/server-src/amindexd.c index 708d153..e1e1ba1 100644 --- a/server-src/amindexd.c +++ b/server-src/amindexd.c @@ -241,7 +241,7 @@ uncompress_file( /* clean the data with clean_backslash */ while (fgets(line, STR_SIZE, pipe_stream) != NULL) { if (line[0] != '\0') { - if (index(line,'/')) { + if (strchr(line,'/')) { clean_backslash(line); full_write(pipe_to_sort,line,strlen(line)); } @@ -1552,6 +1552,10 @@ main( our_feature_string = am_feature_to_string(our_features); their_feature_string = newstralloc(their_feature_string, arg); their_features = am_string_to_feature(their_feature_string); + if (!their_features) { + g_warning("Invalid client feature set '%s'", their_feature_string); + their_features = am_set_default_feature_set(); + } reply(200, "FEATURES %s", our_feature_string); amfree(our_feature_string); amfree(their_feature_string);