From: Rocco Rutte Date: Wed, 14 Mar 2007 18:33:57 +0000 (-0700) Subject: Fix return value for rfc822_write_address() X-Git-Tag: mutt-1-5-15-rel~47^2~18^2~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ca29e0074d70144c7ba2dec597d12412eea309e;p=mutt 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. --- diff --git a/rfc822.c b/rfc822.c index fff3133c..7d9e4bb8 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;