From 245a043d35ef06ccc45f728fa44c1cac7563abcf Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Fri, 3 Nov 2006 13:55:37 +0000 Subject: fix bogus reuse of tmpint32, introducing tmp3int32 git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@66 ef36b2f9-881f-0410-afb5-c4e39611909c --- nslcd-common.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'nslcd-common.h') diff --git a/nslcd-common.h b/nslcd-common.h index f4ce301..48ecb64 100644 --- a/nslcd-common.h +++ b/nslcd-common.h @@ -136,8 +136,8 @@ /* read an array from a stram and store the length of the array in num (size for the array is allocated) */ #define READ_STRINGLIST_NUM(fp,arr,num) \ - READ_TYPE(fp,tmpint32,int32_t); \ - (num)=tmpint32; \ + /* read the number of entries */ \ + READ_INT32(fp,(num)); \ /* allocate room for *char[num] */ \ tmpint32*=sizeof(char *); \ BUF_CHECK(fp,tmpint32); \ @@ -151,15 +151,15 @@ /* read an array from a stram and store it as a null-terminated array list (size for the array is allocated) */ #define READ_STRINGLIST_NULLTERM(fp,arr) \ - READ_TYPE(fp,tmpint32,int32_t); \ + /* read the number of entries */ \ + READ_TYPE(fp,tmp3int32,int32_t); \ /* allocate room for *char[num+1] */ \ - tmp2int32=(tmpint32+1)*sizeof(char *); \ + tmp2int32=(tmp3int32+1)*sizeof(char *); \ BUF_CHECK(fp,tmp2int32); \ (arr)=(char **)BUF_CUR; \ - BUF_SKIP(tmpint32); \ + BUF_SKIP(tmp2int32); \ /* read all entries */ \ - bufptr+=(size_t)tmpint32; \ - for (tmp2int32=0;tmp2int32