Skip to contentSkip to conversation

mei: samples: fix a signedness bug in amt_host_if_call()

PATCH New Dan Carpenter 1 participant 1 message Oct 1, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mei: samples: fix a signedness bug in amt_host_if_call()

"out_buf_sz" needs to be signed for the error handling to work.

samples/mei/mei-amt-version.c +1 -1
index 57d0d871dcf7..33e67bd1dc34 100644
@@ -370,7 +370,7 @@ static uint32_t amt_host_if_call(struct amt_host_if *acmd,
 			unsigned int expected_sz)
 {
 	uint32_t in_buf_sz;
-	uint32_t out_buf_sz;
+	ssize_t out_buf_sz;
 	ssize_t written;
 	uint32_t status;
 	struct amt_host_if_resp_header *msg_hdr;