From 8c081cb1fef6cdfdf4b3d42cc93e97d0d6a59d14 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 9 May 2017 10:05:57 +0200 Subject: Update tinyldap part --- scan_ldapsearchrequest.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scan_ldapsearchrequest.c') diff --git a/scan_ldapsearchrequest.c b/scan_ldapsearchrequest.c index 3261b45..f8a366b 100644 --- a/scan_ldapsearchrequest.c +++ b/scan_ldapsearchrequest.c @@ -7,6 +7,7 @@ size_t scan_ldapsearchrequest(const char* src,const char* max, size_t res,tmp; unsigned long etmp; signed long ltmp; + size_t stmp; s->attributes=0; s->filter=0; if (!(res=scan_ldapstring(src,max,&s->baseObject))) goto error; @@ -27,10 +28,10 @@ size_t scan_ldapsearchrequest(const char* src,const char* max, if (!(tmp=scan_ldapsearchfilter(src+res,max,&s->filter))) goto error; res+=tmp; /* now for the attributelist */ - if (!(tmp=scan_asn1SEQUENCE(src+res,max,&etmp))) goto error; + if (!(tmp=scan_asn1SEQUENCE(src+res,max,&stmp))) goto error; res+=tmp; { - const char* nmax=src+res+etmp; + const char* nmax=src+res+stmp; //#define nmax max struct AttributeDescriptionList** a=&s->attributes; if (nmax>max) goto error; @@ -39,7 +40,7 @@ size_t scan_ldapsearchrequest(const char* src,const char* max, if (src+res==nmax) break; if (!*a) *a=calloc(1,sizeof(struct AttributeDescriptionList)); if (!*a) goto error; - if (!(tmp=scan_ldapstring(src+res,nmax,&(*a)->a))) { free(*a); *a=0; goto error; } + if (!(tmp=scan_ldapstring(src+res,nmax,&(*a)->a))) { goto error; } res+=tmp; a=&(*a)->next; } -- cgit v1.2.3-55-g7522