projects
/
sdk
/
target
/
sdbd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2753653
)
source: avoid potential buffer overflow of scanf
80/133480/1
author
Sooyoung Ha
<yoosah.ha@samsung.com>
Mon, 12 Jun 2017 10:50:04 +0000
(19:50 +0900)
committer
Sooyoung Ha
<yoosah.ha@samsung.com>
Mon, 12 Jun 2017 10:50:04 +0000
(19:50 +0900)
Change-Id: I853dac8153041dc1786bb58f2058f31cba0a56e3
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
src/default_plugin_appcmd.c
patch
|
blob
|
history
diff --git
a/src/default_plugin_appcmd.c
b/src/default_plugin_appcmd.c
index
7c0405e
..
2302386
100644
(file)
--- a/
src/default_plugin_appcmd.c
+++ b/
src/default_plugin_appcmd.c
@@
-632,9
+632,9
@@
static void appcmd_receiver_packageinfo(int fd_in, int fd_out)
}
if (!strncmp(buf, "mainappid : ", 12)) {
- sscanf(buf, "mainappid : %s", mainapp_id);
+ sscanf(buf, "mainappid : %
127
s", mainapp_id);
} else if (!strncmp(buf, "Type: ", 6)) {
- sscanf(buf, "Type: %s", type);
+ sscanf(buf, "Type: %
127
s", type);
} else if (!strncmp(buf, "Removable: ", 11)) {
sscanf(buf, "Removable: %d", &is_removable);
} else if (strstr(buf, " is Running") != NULL) {