summaryrefslogtreecommitdiffstats
path: root/scan_ldapsearchrequest.c
diff options
context:
space:
mode:
authorSimon Rettberg2017-05-09 10:05:57 +0200
committerSimon Rettberg2017-05-09 10:05:57 +0200
commit8c081cb1fef6cdfdf4b3d42cc93e97d0d6a59d14 (patch)
tree890ea62f47af0a06db998142810851f618d27bca /scan_ldapsearchrequest.c
parentDelete some more unused files (diff)
downloadldadp-8c081cb1fef6cdfdf4b3d42cc93e97d0d6a59d14.tar.gz
ldadp-8c081cb1fef6cdfdf4b3d42cc93e97d0d6a59d14.tar.xz
ldadp-8c081cb1fef6cdfdf4b3d42cc93e97d0d6a59d14.zip
Update tinyldap part
Diffstat (limited to 'scan_ldapsearchrequest.c')
-rw-r--r--scan_ldapsearchrequest.c7
1 files changed, 4 insertions, 3 deletions
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;
}