Fix for svace issue (232425) 65/149965/1 accepted/tizen/4.0/unified/20170914.175846 submit/tizen_4.0/20170914.010725 tizen_4.0.IoT.p1_release tizen_4.0.m2_release
authorjh8801.jung <jh8801.jung@samsung.com>
Thu, 14 Sep 2017 00:26:36 +0000 (09:26 +0900)
committerjh8801.jung <jh8801.jung@samsung.com>
Thu, 14 Sep 2017 00:27:00 +0000 (09:27 +0900)
Signed-off-by: jh8801.jung <jh8801.jung@samsung.com>
Change-Id: I95ffd53fad67f06c778fcd5773b2b0e44b991aed

packaging/libmtp.spec
src/ptp-pack.c

index df2a1e8..a403f8b 100755 (executable)
@@ -3,7 +3,7 @@
 Name:       libmtp
 Summary:    Library for media transfer protocol (mtp)
 Version:    1.1.11
-Release:    11
+Release:    12
 Group:      Network & Connectivity/Other
 License:    LGPL-2.1
 Source0:    libmtp-%{version}.tar.gz
index 2912c3b..877a1ce 100755 (executable)
@@ -2018,7 +2018,7 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize,
                        curoff = 8+4+4;
                        if (mask & CANON_EOS_OLC_BUTTON) {
                                ce[i].type = PTP_CANON_EOS_CHANGES_TYPE_UNKNOWN;
-                               ce[i].u.info = malloc(strlen("Button 1234567"));
+                               ce[i].u.info = malloc(strlen("Button 1234567")+1);
                                snprintf(ce[i].u.info, strlen("Button 1234567"), "Button %d",  dtoh16a(curdata+curoff));
                                i++;
                                curoff += 2;