From: Rocco Rutte Date: Wed, 14 Mar 2007 18:33:57 +0000 (-0700) Subject: Fix return value for rfc822_write_address() X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2875fe0d32c5bd93dbb3db1c59fce308aaa9adc3;p=neomutt 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 fff3133c1..7d9e4bb8c 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;