tools: acrn-crashlog: remove unsafe apis from android_events.c

1. Refine strings operation.
2. Remove sscanf, sprintf and strlen.

Tracked-On: #1254
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Chen Gang <gang.c.chen@intel.com>
This commit is contained in:
Liu, Xinwu
2018-09-25 10:08:24 +08:00
committed by Xie, Nanlin
parent 48ce01a52f
commit 5ecf1078ca
8 changed files with 269 additions and 311 deletions

View File

@@ -542,6 +542,7 @@ static void telemd_send_reboot(void)
}
static int telemd_new_vmevent(const char *line_to_sync,
size_t len __attribute__((unused)),
const struct vm_t *vm)
{
char event[ANDROID_WORD_LEN];
@@ -887,7 +888,8 @@ static void crashlog_send_reboot(void)
}
static int crashlog_new_vmevent(const char *line_to_sync,
const struct vm_t *vm)
size_t len __attribute__((unused)),
const struct vm_t *vm)
{
struct sender_t *crashlog;
char event[ANDROID_WORD_LEN];