From a5337344710f7e5592074510038756934d7d77ce Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 17 Oct 2019 17:38:53 -0500 Subject: [PATCH] p2putil: Fix logic in required attribute check The logic here intended to check whether all required attributes were available. However, it set the parse_error to true instead of have_required to false as intended. --- src/p2putil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p2putil.c b/src/p2putil.c index ce7e342b..79371168 100644 --- a/src/p2putil.c +++ b/src/p2putil.c @@ -720,7 +720,7 @@ static int p2p_parse_attrs(const uint8_t *pdu, size_t len, int type, ...) entry = e->data; if (!entry->present && (entry->flags & ATTR_FLAG_REQUIRED)) { - parse_error = true; + have_required = false; goto done; } }