diff --git a/ldapclient.c b/ldapclient.c index 543456e..cb0ba77 100644 --- a/ldapclient.c +++ b/ldapclient.c @@ -161,8 +161,10 @@ nextmessage: } buffer_putsflush(buffer_1,"\n"); free_ldapsearchresultentry(&sre); - } else + } else { + buffer_putsflush(buffer_2,"goto\n"); goto copypartialandcontinue; + } } else if (op==SearchResultDone) { if (!matches) buffer_putsflush(buffer_2,"no matches.\n"); @@ -174,15 +176,14 @@ nextmessage: if (maxava.value.s=s; s+=(*f)->ava.value.l=str_chr(s,')'); } diff --git a/tinyldap.c b/tinyldap.c index 1ce574b..062ea54 100644 --- a/tinyldap.c +++ b/tinyldap.c @@ -193,6 +193,8 @@ static int indexable(struct Filter* f) { if (f->substrings->substrtype!=prefix) return 0; /* fall through */ case EQUAL: + case LESSEQUAL: + case GREATEQUAL: { uint32 ofs; for (ofs=indices_offset+record_count*4; ofs<(unsigned long)filelen;) { @@ -510,16 +512,18 @@ static void answerwith(uint32 ofs,struct SearchRequest* sr,long messageid,int ou if (!adl) { /* did not ask for any attributes. send 'em all. */ /* to do that, construct a list of all attributes */ + + /* FIXME! This adl appears to create a segfault later on */ uint32 i; char* x=map+5*4+size_of_string_table+4; - adl=alloca((attribute_count-1)*sizeof(struct AttributeDescriptionList)); + adl=alloca((attribute_count)*sizeof(struct AttributeDescriptionList)); for (i=0; irecord_count) ni=record_count; + for (; i