Diff between 446e13360dbaa95fd3912ebb9ca734ccb17d7a32 and 648b4362521bcd9146b88d03e51e05454269e27f

Changed Files

File Additions Deletions Status
monitor/att.c +2 -2 modified

Full Patch

diff --git a/monitor/att.c b/monitor/att.c
index d3b8207..18a5af0 100644
--- a/monitor/att.c
+++ b/monitor/att.c
@@ -2934,13 +2934,14 @@ static void print_write(const struct l2cap_frame *frame, uint16_t handle,
 	struct gatt_handler *handler;
 
 	print_handle(frame, handle, false);
-	print_hex_field("  Data", frame->data, frame->size);
 
 	if (len > frame->size) {
 		print_text(COLOR_ERROR, "invalid size");
 		return;
 	}
 
+	print_hex_field("  Data", frame->data, len);
+
 	attr = get_attribute(frame, handle, false);
 	if (!attr)
 		return;
@@ -3105,7 +3106,6 @@ static void att_signed_write_command(const struct l2cap_frame *frame)
 	}
 
 	print_write(frame, handle, frame->size - 12);
-	print_hex_field("  Data", frame->data, frame->size - 12);
 	print_hex_field("  Signature", frame->data + frame->size - 12, 12);
 }