From 1fef0927323b0b09f067bea97fe6ae80493771da Mon Sep 17 00:00:00 2001 From: "jh8801.jung" Date: Wed, 13 Sep 2017 11:13:23 +0900 Subject: [PATCH] Fix for svace issue (29398) Signed-off-by: jh8801.jung Change-Id: Ia07ec5c4d18238a614df39adbab464e0c34cff30 --- include/mtp_cmd_handler.h | 2 +- src/mtp_cmd_handler.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/mtp_cmd_handler.h b/include/mtp_cmd_handler.h index 90559cf..9e809fe 100755 --- a/include/mtp_cmd_handler.h +++ b/include/mtp_cmd_handler.h @@ -73,7 +73,7 @@ typedef struct { */ typedef struct { mtp_char cmd_buf[MTP_MAX_CMD_BLOCK_SIZE]; - mtp_char header_buf[MTP_USB_HEADER_LENGTH]; + mtp_char header_buf[MTP_USB_HEADER_LENGTH + 1]; mtp_uint32 cmd_size; mtp_uint32 data_size; mtp_uint32 data_count; diff --git a/src/mtp_cmd_handler.c b/src/mtp_cmd_handler.c index 4e20d44..cce170e 100755 --- a/src/mtp_cmd_handler.c +++ b/src/mtp_cmd_handler.c @@ -2131,7 +2131,7 @@ static void __set_object_prop_list(mtp_handler_t *hdlr) mtp_uint32 max_bytes = 0; mtp_uint32 h_obj = 0; mtp_uint32 prop_id = 0; - mtp_uint32 data_type = 0; + mtp_uint16 data_type = 0; mtp_uchar *temp = NULL; mtp_int32 bytes_left = 0; mtp_uint32 prop_val_sz = 0; @@ -2217,7 +2217,7 @@ static void __set_object_prop_list(mtp_handler_t *hdlr) /* Update property*/ ret = _hutil_update_object_property(h_obj, prop_id, - (mtp_uint16 *)&data_type, temp, bytes_left, + &data_type, temp, bytes_left, &prop_val_sz); switch (ret) { -- 2.7.4