projects
/
platform
/
core
/
system
/
storaged.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7551b6
)
block: Prevent buffer overflow
63/132663/1
author
pr.jung
<pr.jung@samsung.com>
Wed, 7 Jun 2017 06:00:15 +0000
(15:00 +0900)
committer
pr.jung
<pr.jung@samsung.com>
Wed, 7 Jun 2017 06:00:15 +0000
(15:00 +0900)
- Specify a limit on the input string length
when using s with '%' format specifies for scanf-like functions
Change-Id: I7406565b9d834763784ff8c18bdd9cf31119536d
Signed-off-by: pr.jung <pr.jung@samsung.com>
src/block/block.c
patch
|
blob
|
history
diff --git
a/src/block/block.c
b/src/block/block.c
index
1ccccd6
..
28924d0
100644
(file)
--- a/
src/block/block.c
+++ b/
src/block/block.c
@@
-494,7
+494,7
@@
static int get_mmc_mount_node(char *devnode, char *node, size_t len)
}
/* Check Emulator */
- sscanf(name, "vd%s", emul);
+ sscanf(name, "vd%
31
s", emul);
if (emul[0] == '\0')
return -EINVAL;
for (i = 0 ; i < strlen(emul) ; i++)