* [PATCH BlueZ] shared/bap: Fix scan-build warning
@ 2023-01-13 21:16 Luiz Augusto von Dentz
2023-01-13 22:39 ` [BlueZ] " bluez.test.bot
2023-01-13 23:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2023-01-13 21:16 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This fixes the following warning:
src/shared/bap.c:2268:26: warning: Access to field 'iov_len' results in
a dereference of a null pointer (loaded from variable 'cont')
return iov_append(data, cont->iov_len, cont->iov_base);
^~~~~~~~~~~~~
---
src/shared/bap.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/shared/bap.c b/src/shared/bap.c
index 0cafb75e69d0..88697988e991 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -2261,6 +2261,12 @@ static void *ltv_merge(struct iovec *data, struct iovec *cont)
{
uint8_t delimiter = 0;
+ if (!data)
+ return NULL;
+
+ if (!cont || !cont->iov_len || !cont->iov_base)
+ return data->iov_base;
+
iov_append(data, sizeof(delimiter), &delimiter);
return iov_append(data, cont->iov_len, cont->iov_base);
--
2.37.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ] shared/bap: Fix scan-build warning
2023-01-13 21:16 [PATCH BlueZ] shared/bap: Fix scan-build warning Luiz Augusto von Dentz
@ 2023-01-13 22:39 ` bluez.test.bot
2023-01-13 23:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2023-01-13 22:39 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 1532 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=711925
---Test result---
Test Summary:
CheckPatch PASS 0.77 seconds
GitLint FAIL 0.63 seconds
BuildEll PASS 27.43 seconds
BluezMake PASS 980.77 seconds
MakeCheck PASS 11.74 seconds
MakeDistcheck PASS 149.00 seconds
CheckValgrind PASS 244.73 seconds
CheckSmatch PASS 325.49 seconds
bluezmakeextell PASS 97.76 seconds
IncrementalBuild PASS 831.42 seconds
ScanBuild PASS 1014.14 seconds
Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ] shared/bap: Fix scan-build warning
WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
10: B3 Line contains hard tab characters (\t): " ^~~~~~~~~~~~~"
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ] shared/bap: Fix scan-build warning
2023-01-13 21:16 [PATCH BlueZ] shared/bap: Fix scan-build warning Luiz Augusto von Dentz
2023-01-13 22:39 ` [BlueZ] " bluez.test.bot
@ 2023-01-13 23:00 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2023-01-13 23:00 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Fri, 13 Jan 2023 13:16:38 -0800 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> This fixes the following warning:
>
> src/shared/bap.c:2268:26: warning: Access to field 'iov_len' results in
> a dereference of a null pointer (loaded from variable 'cont')
> return iov_append(data, cont->iov_len, cont->iov_base);
> ^~~~~~~~~~~~~
>
> [...]
Here is the summary with links:
- [BlueZ] shared/bap: Fix scan-build warning
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=6f8b3544b95e
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:[~2023-01-13 23:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 21:16 [PATCH BlueZ] shared/bap: Fix scan-build warning Luiz Augusto von Dentz
2023-01-13 22:39 ` [BlueZ] " bluez.test.bot
2023-01-13 23:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.