diff options
author | Peter Hessler <phessler@cvs.openbsd.org> | 2017-01-19 10:19:40 +0000 |
---|---|---|
committer | Peter Hessler <phessler@cvs.openbsd.org> | 2017-01-19 10:19:40 +0000 |
commit | b8054642d04452296efa4891101a1624831906fa (patch) | |
tree | 11e63489295f739a3e9c47de476b7a5419b6929a /sys | |
parent | fcbb21d8a2a9a846b6b3ab6ca2eced979ec7c906 (diff) |
when parsing a BFD packet, avoid an uninitialized variable if the
version check fails
found by jsg@ with clang
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/bfd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/bfd.c b/sys/net/bfd.c index 909c561cbe8..3cdca323133 100644 --- a/sys/net/bfd.c +++ b/sys/net/bfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bfd.c,v 1.45 2017/01/19 09:57:39 phessler Exp $ */ +/* $OpenBSD: bfd.c,v 1.46 2017/01/19 10:19:39 phessler Exp $ */ /* * Copyright (c) 2016 Peter Hessler <phessler@openbsd.org> @@ -668,7 +668,7 @@ bfd_input(struct bfd_config *bfd, struct mbuf *m) struct bfd_header *peer; struct bfd_auth_header *auth; struct mbuf *mp, *mp0; - unsigned int ver, diag, state, flags; + unsigned int ver, diag = BFD_DIAG_NONE, state, flags; int offp; mp = m_pulldown(m, 0, sizeof(*peer), &offp); |