diff options
-rw-r--r-- | common/nslcd-prot.h | 6 | ||||
-rw-r--r-- | nslcd/common.h | 2 |
2 files changed, 5 insertions, 3 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); \ } diff --git a/nslcd/common.h b/nslcd/common.h index eaf3f53..fafa25a 100644 --- a/nslcd/common.h +++ b/nslcd/common.h @@ -46,7 +46,7 @@ return -1; #define ERROR_OUT_BUFERROR(fp) \ - log_log(LOG_WARNING,"client supplied argument too large"); \ + log_log(LOG_WARNING,"client supplied argument %d bytes too large",tmpint32); \ return -1; /* a simple wrapper around snprintf, |