diff mbox series

[BlueZ,1/2] monitor: Fix crash when there is no write handler

Message ID 20230323102858.566934-2-simon.mikuda@streamunlimited.com
State New
Headers show
Series monitor | expand

Commit Message

Simon Mikuda March 23, 2023, 10:28 a.m. UTC
---
 monitor/att.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com March 23, 2023, 11:48 a.m. UTC | #1
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=733108

---Test result---

Test Summary:
CheckPatch                    FAIL      1.28 seconds
GitLint                       FAIL      0.96 seconds
BuildEll                      PASS      27.11 seconds
BluezMake                     PASS      867.28 seconds
MakeCheck                     PASS      11.16 seconds
MakeDistcheck                 PASS      150.36 seconds
CheckValgrind                 PASS      245.68 seconds
CheckSmatch                   WARNING   328.41 seconds
bluezmakeextell               PASS      98.55 seconds
IncrementalBuild              PASS      1441.30 seconds
ScanBuild                     PASS      1013.20 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,2/2] monitor: Fix printing Signed Write Command
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#81: 
        Handle: 0x006f Type: Vendor specific (f7debc9a-7856-3412-7856-341278563412)

/github/workspace/src/src/13185462.patch total: 0 errors, 1 warnings, 22 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/src/13185462.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,2/2] monitor: Fix printing Signed Write Command

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
6: B1 Line exceeds max length (83>80): "        Handle: 0x006f Type: Vendor specific (f7debc9a-7856-3412-7856-341278563412)"
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
monitor/att.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.monitor/att.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.


---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/monitor/att.c b/monitor/att.c
index f9643b333..d3b82074f 100644
--- a/monitor/att.c
+++ b/monitor/att.c
@@ -2946,7 +2946,7 @@  static void print_write(const struct l2cap_frame *frame, uint16_t handle,
 		return;
 
 	handler = get_handler(attr);
-	if (!handler)
+	if (!handler || !handler->write)
 		return;
 
 	handler->write(frame);