power: Ensure node_path is a string literal
Change-Id: I20a87b04789e7fe2ae5938331e9d2fcef8134035
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 @@
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 @@
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);
}
}
}