[PATCH 35/60] Remove magic number to check commands of 5 Bytes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: José Antonio Santos-Cadenas <santoscadenas@xxxxxxxxx>

---
 mcap/mcap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mcap/mcap.c b/mcap/mcap.c
index d3c92dc..f408cbf 100644
--- a/mcap/mcap.c
+++ b/mcap/mcap.c
@@ -1262,7 +1262,7 @@ static gboolean process_md_create_mdl_rsp(struct mcap_mcl *mcl,
 	if (gerr)
 		goto fail;
 
-	if (len < 5) {
+	if (len < sizeof(mcap5B_rsp)) {
 		g_set_error(&gerr, MCAP_ERROR, MCAP_ERROR_FAILED,
 							"Protocol error");
 		close = TRUE;
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux