Skip to content

Fix a number of static analysis issues #2

Bastien Nocera linux-bluetooth 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15main: Simplify variable assignmentsrc/main.c+10 -90 replies
2/15shared/ecc: Fix uninitialised variable usagesrc/shared/ecc.c+2 -00 replies
3/15shared/gatt-client: Fix uninitialised variable usagesrc/shared/gatt-client.c+1 -10 replies
4/15tools/mesh-cfgclient: Fix uninitialised variable usagetools/mesh-cfgclient.c+1 -20 replies
5/15test-runner: Remove unused envptools/test-runner.c+2 -20 replies
6/15test-runner: Fix uninitialised variable usagetools/test-runner.c+5 -00 replies
7/15test-runner: Fix uninitialised variable usagetools/test-runner.c+2 -20 replies
8/15shared/bap: Fix possible use-after-freesrc/shared/bap.c+6 -30 replies
9/15isotest: Fix bad freetools/isotest.c+5 -20 replies
10/15test-runner: Fix fd leak on failuretools/test-runner.c+2 -00 replies
11/15isotest: Fix string size expectationstools/isotest.c+11 -20 replies
12/15mgmt-tester: Fix non-nul-terminated stringtools/mgmt-tester.c+6 -20 replies
13/15gdbus: Check sprintf retvalgdbus/watch.c+34 -120 replies
14/15shared/bap: Fix memory leak in error pathsrc/shared/bap.c+8 -20 replies
15/15android/handsfree: Check sprintf retvalandroid/handsfree.c+11 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [BlueZ 00/15] Fix a number of static analysis issues #2

"main: Simplify variable assignment" makes a come back, moving out the single special-case out of the function.

For "shared/gatt-client: Fix uninitialised variable usage", please verify that this default value is correct.

Happy to iterate on any patches you feel are suboptimal. Note that the only patches that received any sort of real-world testing are the one mentioned above and the gdbus one.

Cheers

Bastien Nocera (15):
main: Simplify variable assignment shared/ecc: Fix uninitialised variable usage shared/gatt-client: Fix uninitialised variable usage tools/mesh-cfgclient: Fix uninitialised variable usage
test-runner: Remove unused envp
test-runner: Fix uninitialised variable usage
test-runner: Fix uninitialised variable usage shared/bap: Fix possible use-after-free
isotest: Fix bad free
test-runner: Fix fd leak on failure
isotest: Fix string size expectations
mgmt-tester: Fix non-nul-terminated string
gdbus: Check sprintf retval
shared/bap: Fix memory leak in error path android/handsfree: Check sprintf retval

 android/handsfree.c      | 14 +++++++++---
 gdbus/watch.c            | 46 +++++++++++++++++++++++++++++-----------
 src/main.c               | 19 +++++++++--------
 src/shared/bap.c         | 19 ++++++++++++-----
 src/shared/ecc.c         |  2 ++
 src/shared/gatt-client.c |  2 +-
 tools/isotest.c          | 20 +++++++++++++----
 tools/mesh-cfgclient.c   |  3 +--
 tools/mgmt-tester.c      |  8 +++++--
 tools/test-runner.c      | 15 +++++++++----
 10 files changed, 106 insertions(+), 42 deletions(-)
Signature · 1 line
2.44.0