From 2f1d0fd78874b941352bb3efddee8cd0b4b0c964 Mon Sep 17 00:00:00 2001 From: WanqQixiang Date: Fri, 23 Aug 2024 09:59:43 +0800 Subject: [PATCH] Add check for subtype number --- src/lib/shell/commands/Dns.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/shell/commands/Dns.cpp b/src/lib/shell/commands/Dns.cpp index 327e14650c7a57..917f94f849d865 100644 --- a/src/lib/shell/commands/Dns.cpp +++ b/src/lib/shell/commands/Dns.cpp @@ -225,6 +225,7 @@ bool ParseSubType(int argc, char ** argv, Dnssd::DiscoveryFilter & filter) if (filterType == Dnssd::DiscoveryFilterType::kCompressedFabricId) { VerifyOrReturnError(ArgParser::ParseInt(subtype + 2, code, 16), false); + VerifyOrReturnValue(code != 0, false); } else {