ldapbindrequest with password created invalid packet
ldapclient only evaluated the first record minor robustness fixes for tinyldap
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "ip6.h"
|
||||
#include <wait.h>
|
||||
#endif
|
||||
#include <signal.h>
|
||||
|
||||
#define verbose 1
|
||||
#define debug 1
|
||||
@@ -523,7 +524,7 @@ int handle(int in,int out) {
|
||||
int res;
|
||||
long messageid,op,Len;
|
||||
if (tmp==0)
|
||||
if (!len) { return 0; }
|
||||
if (BUFSIZE-len) { return 0; }
|
||||
if (tmp<0) { write(2,"error!\n",7); return 1; }
|
||||
len+=tmp;
|
||||
res=scan_ldapmessage(buf,buf+len,&messageid,&op,&Len);
|
||||
@@ -772,6 +773,8 @@ int main() {
|
||||
int sock;
|
||||
#endif
|
||||
|
||||
signal(SIGPIPE,SIG_IGN);
|
||||
|
||||
map=mmap_read("data",&filelen);
|
||||
if (!map) {
|
||||
buffer_putsflush(buffer_2,"could not open data!\n");
|
||||
|
||||
Reference in New Issue
Block a user