projects
/
platform
/
core
/
api
/
vine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89188f0
)
Check the return value of calloc
79/306279/1
accepted/tizen/unified/20240220.144635
accepted/tizen/unified/x/20240221.033418
author
cheoleun moon
<chleun.moon@samsung.com>
Mon, 19 Feb 2024 11:04:42 +0000
(20:04 +0900)
committer
cheoleun moon
<chleun.moon@samsung.com>
Mon, 19 Feb 2024 11:04:48 +0000
(20:04 +0900)
Change-Id: Ib4c76e2c577f4c0f43ca7a0e0d119a0b9fdf6773
tool/tool_run.cpp
patch
|
blob
|
history
diff --git
a/tool/tool_run.cpp
b/tool/tool_run.cpp
index
f003adf
..
4b95eaf
100755
(executable)
--- a/
tool/tool_run.cpp
+++ b/
tool/tool_run.cpp
@@
-388,6
+388,10
@@
static int _send_message_from_file(vine_dp_h dp)
return -1;
}
buf = (unsigned char *)calloc(sizeof(unsigned char), size);
+ if (buf == NULL) {
+ fclose(file);
+ return -1;
+ }
fseek(file, 0, SEEK_SET);
count = fread(buf, sizeof(unsigned char), size, file);