projects
/
platform
/
core
/
system
/
sensord.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1777765
)
sensorctl: change scanf to cin for security issue
51/150551/2
author
kibak.yoon
<kibak.yoon@samsung.com>
Mon, 18 Sep 2017 02:09:16 +0000
(11:09 +0900)
committer
kibak.yoon
<kibak.yoon@samsung.com>
Mon, 18 Sep 2017 02:11:22 +0000
(11:11 +0900)
Change-Id: Id5760c1fe643729d67716323360cb43d0147aa7b
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
src/sensorctl/tester_manual.cpp
patch
|
blob
|
history
diff --git
a/src/sensorctl/tester_manual.cpp
b/src/sensorctl/tester_manual.cpp
index
2e40851
..
cc10bd1
100644
(file)
--- a/
src/sensorctl/tester_manual.cpp
+++ b/
src/sensorctl/tester_manual.cpp
@@
-17,6
+17,7
@@
*
*/
+#include <iostream>
#include <getopt.h>
#include "tester.h"
@@
-130,8
+131,7
@@
TESTCASE(manual_test, sensor)
if (sensor_adapter::get_count(stype) > 1) {
_N("There are more than 2 sensors. please enter the index : ");
- if (scanf("%d", &index) != 1)
- return false;
+ std::cin >> index;
}
sensor_info info(stype, index, interval, latency, powersave, test_cb, NULL);