From: Richard Russon Date: Fri, 15 Dec 2017 14:51:14 +0000 (+0000) Subject: Pointer to local outside scope X-Git-Tag: neomutt-20180223~65^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1866049a05528af5cc2af6395a733eaf1667cf80;p=neomutt Pointer to local outside scope The code returned a pointer to an array that had gone out of scope. --- diff --git a/ncrypt/gnupgparse.c b/ncrypt/gnupgparse.c index 624723a8a..a9bdc0dea 100644 --- a/ncrypt/gnupgparse.c +++ b/ncrypt/gnupgparse.c @@ -130,6 +130,7 @@ static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKe int trust = 0; int flags = 0; struct PgpKeyInfo tmp; + char tstr[11]; *is_subkey = 0; if (!*buf) @@ -252,7 +253,6 @@ static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKe } case 6: /* timestamp (1998-02-28) */ { - char tstr[11]; struct tm time; mutt_debug(2, "time stamp: %s\n", p);