fix some defects
authorChulHo Song <ch81.song@samsung.com>
Mon, 4 Jan 2016 06:06:07 +0000 (15:06 +0900)
committerChulHo Song <ch81.song@samsung.com>
Mon, 4 Jan 2016 06:06:07 +0000 (15:06 +0900)
Change-Id: I7439b61a60a6e3d5eecf0c7524c7e8ef62792986
Signed-off-by: ChulHo Song <ch81.song@samsung.com>
src/device_manager_plugin_emul.c

index 53a8550ffb8ed7276758b1ef24aa502350a78291..3bf91fa6e2983fdc6ba6451360613ae452dcd378 100644 (file)
@@ -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);