From 2461d6a62e61a4b9e4b4135dd2d24f48316ab1fd Mon Sep 17 00:00:00 2001 From: ChulHo Song Date: Mon, 4 Jan 2016 15:06:07 +0900 Subject: [PATCH] fix some defects Change-Id: I7439b61a60a6e3d5eecf0c7524c7e8ef62792986 Signed-off-by: ChulHo Song --- src/device_manager_plugin_emul.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/device_manager_plugin_emul.c b/src/device_manager_plugin_emul.c index 53a8550..3bf91fa 100644 --- a/src/device_manager_plugin_emul.c +++ b/src/device_manager_plugin_emul.c @@ -261,7 +261,7 @@ static int OEM_sys_display_info(struct display_info *disp_info) break; } - if (!strcmp(".", dent->d_name) || !strcmp("..", dent->d_name)) + if (!strncmp(".", dent->d_name, sizeof(".")) || !strncmp("..", dent->d_name, sizeof(".."))) continue; else { strncpy(disp_info[index].bl_name, dent->d_name, sizeof(disp_info[index].bl_name) - 1); @@ -284,7 +284,7 @@ static int OEM_sys_display_info(struct display_info *disp_info) break; } - if (!strcmp(".", dent->d_name) || !strcmp("..", dent->d_name)) + if (!strncmp(".", dent->d_name, sizeof(".")) || !strncmp("..", dent->d_name, sizeof(".."))) continue; else { strncpy(disp_info[index].lcd_name, dent->d_name, sizeof(disp_info[index].lcd_name) - 1); -- 2.7.4