A theoretical path exists where ext.data1 is not initialized by
authormbuhl <mbuhl@openbsd.org>
Thu, 10 Nov 2022 10:47:30 +0000 (10:47 +0000)
committermbuhl <mbuhl@openbsd.org>
Thu, 10 Nov 2022 10:47:30 +0000 (10:47 +0000)
parseextcommunity but used afterwards.
Found by codechecker.
OK claudio

usr.sbin/bgpctl/parser.c

index df79566..b03e4dc 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: parser.c,v 1.117 2022/10/17 16:51:36 claudio Exp $ */
+/*     $OpenBSD: parser.c,v 1.118 2022/11/10 10:47:30 mbuhl Exp $ */
 
 /*
  * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -719,7 +719,7 @@ match_token(int *argc, char **argv[], const struct token table[])
                case RD:
                        if (word != NULL && wordlen > 0) {
                                char *p = strdup(word);
-                               struct community ext;
+                               struct community ext = { 0 };
                                uint64_t rd;
 
                                if (p == NULL)