]> granicus.if.org Git - neomutt/commitdiff
Pointer to local outside scope
authorRichard Russon <rich@flatcap.org>
Fri, 15 Dec 2017 14:51:14 +0000 (14:51 +0000)
committerRichard Russon <rich@flatcap.org>
Thu, 28 Dec 2017 13:40:18 +0000 (13:40 +0000)
The code returned a pointer to an array that had gone out of scope.

ncrypt/gnupgparse.c

index 624723a8ad8b9ecb8e45c2e48370b207d62580fb..a9bdc0dea2bd5666b53cf9e6669000de80267036 100644 (file)
@@ -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);