summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher N. Hesse <raymanfx@gmail.com>2016-02-01 12:36:54 +0100
committerChristopher N. Hesse <raymanfx@gmail.com>2016-02-01 12:36:54 +0100
commit22da313eb2b85f8c10d871e1a0322c3acfbd6136 (patch)
tree695affc4ce8e4926f019c22aa4d2decc3b1d9d17
parent79a9b15147870de4a19afc449ab237eb3211cc1b (diff)
downloadandroid_hardware_samsung-22da313eb2b85f8c10d871e1a0322c3acfbd6136.tar.gz
android_hardware_samsung-22da313eb2b85f8c10d871e1a0322c3acfbd6136.tar.bz2
android_hardware_samsung-22da313eb2b85f8c10d871e1a0322c3acfbd6136.zip
power: Ensure node_path is a string literal
Change-Id: I20a87b04789e7fe2ae5938331e9d2fcef8134035
-rw-r--r--power/power.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/power/power.c b/power/power.c
index 0b939b8..5a0b116 100644
--- a/power/power.c
+++ b/power/power.c
@@ -183,7 +183,8 @@ static void find_input_nodes(struct samsung_power_module *samsung_pwr, char *dir
ALOGE("Out of memory: %s\n", errno_str);
return;
}
- snprintf(samsung_pwr->touchkey_power_path, node_pathsize, node_path);
+ snprintf(samsung_pwr->touchkey_power_path, node_pathsize,
+ "%s", node_path);
}
if (strncmp(file_content, "sec_touchscreen", 15) == 0) {
@@ -194,7 +195,8 @@ static void find_input_nodes(struct samsung_power_module *samsung_pwr, char *dir
ALOGE("Out of memory: %s\n", errno_str);
return;
}
- snprintf(samsung_pwr->touchscreen_power_path, node_pathsize, node_path);
+ snprintf(samsung_pwr->touchscreen_power_path, node_pathsize,
+ "%s", node_path);
}
}
}