aboutsummaryrefslogtreecommitdiffstats
path: root/samsung-ipc
diff options
context:
space:
mode:
Diffstat (limited to 'samsung-ipc')
-rw-r--r--samsung-ipc/ipc_utils.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/samsung-ipc/ipc_utils.c b/samsung-ipc/ipc_utils.c
index a907e35..33860ce 100644
--- a/samsung-ipc/ipc_utils.c
+++ b/samsung-ipc/ipc_utils.c
@@ -358,7 +358,8 @@ int ipc_data_dump(struct ipc_client *client, const void *data, size_t size)
unsigned int cols = 8;
unsigned int cols_count = 2;
int spacer;
- char string[81];
+ char string[81] = { 0 };
+ char final[161] = { 0 };
size_t length;
char *print;
unsigned char *p;
@@ -471,7 +472,18 @@ int ipc_data_dump(struct ipc_client *client, const void *data, size_t size)
*print = '\0';
- ipc_client_log(client, string);
+ // Escape string
+
+ j = 0;
+
+ for (i = 0; i < sizeof(string); i++) {
+ if (string[i] == '%')
+ final[j++] = string[i];
+
+ final[j++] = string[i];
+ }
+
+ ipc_client_log(client, final);
}
return 0;