summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjh8801.jung <jh8801.jung@samsung.com>2017-09-13 11:13:23 +0900
committerjh8801.jung <jh8801.jung@samsung.com>2017-09-14 07:59:16 +0900
commitafb8592010c7910d298baf2b4d7a670f5a9e9eeb (patch)
tree46a9521f75a1a3f3004f897ee450f0ba880bdac3
parent45af7e931e9d1b1115ebb2d6816240c17725111d (diff)
downloadmtp-responder-afb8592010c7910d298baf2b4d7a670f5a9e9eeb.tar.gz
mtp-responder-afb8592010c7910d298baf2b4d7a670f5a9e9eeb.tar.bz2
mtp-responder-afb8592010c7910d298baf2b4d7a670f5a9e9eeb.zip
Signed-off-by: jh8801.jung <jh8801.jung@samsung.com> Change-Id: Ia07ec5c4d18238a614df39adbab464e0c34cff30
-rwxr-xr-xinclude/mtp_cmd_handler.h2
-rwxr-xr-xsrc/mtp_cmd_handler.c4
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) {