diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2010-05-13 21:13:14 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2010-05-13 21:13:14 +0200 |
commit | f7345f3999551c16ef7af0e6f52a2ede3c919f3d (patch) | |
tree | e60665c4d712525950b6f5f9166616d54af9cc1a /common | |
parent | 4967079c33f5f32489affd2d6fb790e8842e1b05 (diff) |
make logging of buffer checks consistent
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1104 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'common')
-rw-r--r-- | common/nslcd-prot.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/nslcd-prot.h b/common/nslcd-prot.h index abfb4cb..ade9c7d 100644 --- a/common/nslcd-prot.h +++ b/common/nslcd-prot.h @@ -180,7 +180,8 @@ static void debug_dump(const void *ptr,size_t size) if (((size_t)tmpint32)>=sizeof(buffer)) \ { \ /* will not fit */ \ - DEBUG_PRINT("READ : buffer error: %d bytes too large",(tmpint32-sizeof(buffer))+1); \ + tmpint32=(tmpint32-sizeof(buffer))+1; \ + DEBUG_PRINT("READ : buffer %d bytes too small",tmpint32); \ ERROR_OUT_BUFERROR(fp); \ } \ /* read string from the stream */ \ @@ -209,7 +210,8 @@ static void debug_dump(const void *ptr,size_t size) if ((bufptr+(size_t)(sz))>buflen) \ { \ /* will not fit */ \ - DEBUG_PRINT("READ : buffer error: %d bytes too small",(bufptr+(sz)-(buflen))); \ + tmpint32=bufptr+(sz)-(buflen); \ + DEBUG_PRINT("READ : buffer %d bytes too small",tmpint32); \ ERROR_OUT_BUFERROR(fp); \ } |