projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9021cc
)
emulator: tighten validation for conf file
author
SeokYeon Hwang
<syeon.hwang@samsung.com>
Tue, 25 Oct 2016 04:53:16 +0000
(13:53 +0900)
committer
SeokYeon Hwang
<syeon.hwang@samsung.com>
Tue, 25 Oct 2016 04:58:09 +0000
(13:58 +0900)
Change-Id: Iaae354e0815a568a7685d430959e60f8e5b424b9
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
tizen/src/emulator_options.c
patch
|
blob
|
history
diff --git
a/tizen/src/emulator_options.c
b/tizen/src/emulator_options.c
index
209bbab
..
03ea020
100644
(file)
--- a/
tizen/src/emulator_options.c
+++ b/
tizen/src/emulator_options.c
@@
-220,7
+220,12
@@
bool load_conf(const char * const conf)
assert(!!conf);
filename = g_strdup(conf);
- file = fopen(filename, "r");
+ if(!g_file_test(filename, G_FILE_TEST_IS_REGULAR)) {
+ fprintf(stderr,
+ "Profile configuration file [%s] is invalid.\n", filename);
+ return false;
+ }
+ file = g_fopen(filename, "r");
if (!file) {
fprintf(stderr,
"Profile configuration file [%s] is not found.\n", filename);