* [BlueZ PATCH] mgmt-tester: Fix null dereference issue reported by scan-build @ 2022-06-23 4:45 Tedd Ho-Jeong An 2022-06-23 6:34 ` [BlueZ] " bluez.test.bot 2022-06-23 23:30 ` [BlueZ PATCH] " patchwork-bot+bluetooth 0 siblings, 2 replies; 3+ messages in thread From: Tedd Ho-Jeong An @ 2022-06-23 4:45 UTC (permalink / raw) To: linux-bluetooth From: Tedd Ho-Jeong An <tedd.an@intel.com> This patch fixes the null dereference reported by the scan-build. tools/mgmt-tester.c:12025:28: warning: Access to field 'cap_len' results in a dereference of a null pointer (loaded from variable 'rp') [core.NullDereference] if (sizeof(rp->cap_len) + rp->cap_len != length) { ^~~~~~~~~~~ --- tools/mgmt-tester.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index f45a6c015..6018327f1 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -12020,12 +12020,14 @@ static void read_50_controller_cap_complete(uint8_t status, uint16_t length, tester_warn("Failed to read advertising features: %s (0x%02x)", mgmt_errstr(status), status); tester_test_failed(); + return; } if (sizeof(rp->cap_len) + rp->cap_len != length) { tester_warn("Controller capabilities malformed, size %zu != %u", sizeof(rp->cap_len) + rp->cap_len, length); tester_test_failed(); + return; } while (offset < rp->cap_len) { -- 2.34.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ] mgmt-tester: Fix null dereference issue reported by scan-build 2022-06-23 4:45 [BlueZ PATCH] mgmt-tester: Fix null dereference issue reported by scan-build Tedd Ho-Jeong An @ 2022-06-23 6:34 ` bluez.test.bot 2022-06-23 23:30 ` [BlueZ PATCH] " patchwork-bot+bluetooth 1 sibling, 0 replies; 3+ messages in thread From: bluez.test.bot @ 2022-06-23 6:34 UTC (permalink / raw) To: linux-bluetooth, hj.tedd.an [-- Attachment #1: Type: text/plain, Size: 996 bytes --] This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=653027 ---Test result--- Test Summary: CheckPatch PASS 1.04 seconds GitLint PASS 0.74 seconds Prep - Setup ELL PASS 50.02 seconds Build - Prep PASS 0.61 seconds Build - Configure PASS 9.94 seconds Build - Make PASS 1476.84 seconds Make Check PASS 12.26 seconds Make Check w/Valgrind PASS 531.33 seconds Make Distcheck PASS 274.83 seconds Build w/ext ELL - Configure PASS 10.00 seconds Build w/ext ELL - Make PASS 1453.92 seconds Incremental Build with patchesPASS 0.00 seconds --- Regards, Linux Bluetooth ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [BlueZ PATCH] mgmt-tester: Fix null dereference issue reported by scan-build 2022-06-23 4:45 [BlueZ PATCH] mgmt-tester: Fix null dereference issue reported by scan-build Tedd Ho-Jeong An 2022-06-23 6:34 ` [BlueZ] " bluez.test.bot @ 2022-06-23 23:30 ` patchwork-bot+bluetooth 1 sibling, 0 replies; 3+ messages in thread From: patchwork-bot+bluetooth @ 2022-06-23 23:30 UTC (permalink / raw) To: Tedd Ho-Jeong An; +Cc: linux-bluetooth Hello: This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Wed, 22 Jun 2022 21:45:20 -0700 you wrote: > From: Tedd Ho-Jeong An <tedd.an@intel.com> > > This patch fixes the null dereference reported by the scan-build. > > tools/mgmt-tester.c:12025:28: warning: Access to field 'cap_len' results > in a dereference of a null pointer (loaded from variable 'rp') > [core.NullDereference] > > [...] Here is the summary with links: - [BlueZ] mgmt-tester: Fix null dereference issue reported by scan-build https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=e3c92f1f786f You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-23 23:30 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-06-23 4:45 [BlueZ PATCH] mgmt-tester: Fix null dereference issue reported by scan-build Tedd Ho-Jeong An 2022-06-23 6:34 ` [BlueZ] " bluez.test.bot 2022-06-23 23:30 ` [BlueZ PATCH] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).