projects
/
platform
/
upstream
/
libmtp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a2326a
)
Fix Svace issue : dereference memory
42/271642/1
accepted/tizen/unified/20220225.151859
submit/tizen/20220224.045724
author
Jihoon Jung
<jh8801.jung@samsung.com>
Thu, 24 Feb 2022 04:13:43 +0000
(13:13 +0900)
committer
Jihoon Jung
<jh8801.jung@samsung.com>
Thu, 24 Feb 2022 04:14:48 +0000
(13:14 +0900)
Change-Id: Ia8a584ac6755b8fa432e0563376f2c1511fdc3ac
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
src/libmtp.c
patch
|
blob
|
history
diff --git
a/src/libmtp.c
b/src/libmtp.c
index
b53877a
..
1b0d6a0
100755
(executable)
--- a/
src/libmtp.c
+++ b/
src/libmtp.c
@@
-8858,6
+8858,9
@@
int LIBMTP_Send_Representative_Sample(LIBMTP_mtpdevice_t *device,
// Go ahead and send the data
propval.a.count = sampledata->size;
propval.a.v = malloc(sizeof(PTPPropertyValue) * sampledata->size);
+ if (propval.a.v == NULL)
+ return -1;
+
for (i = 0; i < sampledata->size; i++) {
propval.a.v[i].u8 = sampledata->data[i];
}