summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) {