<<< Date Index >>>     <<< Thread Index >>>

[PATCH] Fix return value for rfc822_write_address()



The strcat cleanup changed the return type from void to int but didn't
provide a return value for the case of bogus function arguments.
---
 rfc822.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/rfc822.c b/rfc822.c
index fff3133..7d9e4bb 100644
--- a/rfc822.c
+++ b/rfc822.c
@@ -697,7 +697,7 @@ int rfc822_write_address (char *buf, size_t buflen, ADDRESS 
*addr, int display)
   if (len > 0)
   {
     if (len > buflen)
-      return; /* safety check for bogus arguments */
+      return pbuf - buf; /* safety check for bogus arguments */
 
     pbuf += len;
     buflen -= len;
-- 
1.5.0.3.920.g51d7f