projects
/
platform
/
core
/
system
/
swap-probe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a55ca65
)
[FIX] bounds violation in fread()
60/48660/2
author
Anatolii Nikulin
<nikulin.a@samsung.com>
Thu, 24 Sep 2015 09:06:35 +0000
(12:06 +0300)
committer
Dmitry Kovalenko
<d.kovalenko@samsung.com>
Thu, 24 Sep 2015 09:40:36 +0000
(
02:40
-0700)
Change-Id: Id5b93c213b7312494c308f911cc5289f1ac41eec
Signed-off-by: Anatolii Nikulin <nikulin.a@samsung.com>
helper/libdaprobe.c
patch
|
blob
|
history
diff --git
a/helper/libdaprobe.c
b/helper/libdaprobe.c
index
85a1bfd
..
b7fc6d1
100755
(executable)
--- a/
helper/libdaprobe.c
+++ b/
helper/libdaprobe.c
@@
-114,10
+114,9
@@
void application_exit()
snprintf(buf, sizeof(buf), "/proc/%d/cmdline", gpid);
f = fopen(buf, "r");
if (f != NULL) {
- f
scanf(f, "%s", bu
f);
+ f
read(buf, strlen(manager_name), 1,
f);
fclose(f);
- if (strlen(buf) == strlen(manager_name) &&
- strncmp(buf, manager_name, sizeof(manager_name)) == 0) {
+ if (!memcmp(buf, manager_name, strlen(manager_name))) {
/* Luke, I am your father
* da_manager is our parent
* looks like we are common applicaton