Fix for svace issue (29398) 90/149690/2 accepted/tizen/unified/20170914.065509 submit/tizen/20170914.010846
authorjh8801.jung <jh8801.jung@samsung.com>
Wed, 13 Sep 2017 02:13:23 +0000 (11:13 +0900)
committerjh8801.jung <jh8801.jung@samsung.com>
Wed, 13 Sep 2017 22:59:16 +0000 (07:59 +0900)
Signed-off-by: jh8801.jung <jh8801.jung@samsung.com>
Change-Id: Ia07ec5c4d18238a614df39adbab464e0c34cff30

include/mtp_cmd_handler.h
src/mtp_cmd_handler.c

index 90559cf..9e809fe 100755 (executable)
@@ -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;
index 4e20d44..cce170e 100755 (executable)
@@ -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) {