Fix svace issues in mtd and testcases for filesystem.
authorAhreum Jeong <ahreum.jeong@samsung.com>
Wed, 30 Aug 2017 03:31:00 +0000 (12:31 +0900)
committerAhreum Jeong <ahreum.jeong@samsung.com>
Wed, 30 Aug 2017 04:43:19 +0000 (13:43 +0900)
commitb4e3fcbc4d2d3e18adce064d71cf3defded2d4a8
treec13f588a05c5289898da6859ef8af415c6f6937c
parentf647cd80ac45863a015ce3b9f286028571124f36
Fix svace issues in mtd and testcases for filesystem.

fs_main.c
- The handle 'dirp' was created at fs_main.c:629 by calling function 'opendir' and lost at fs_main.c:631.
- The handle 'ret' was created at fs_main.c:392 by calling function 'dup' and lost at fs_main.c:393.
- Handler 'fd' is passed to a function at fs_main.c:489 by calling function 'close' after the handler is closed again at fs_main.c:485 by calling function 'close'.
- The handle 'fd1' was created at fs_main.c:447 by calling function 'dup2' and lost at fs_main.c:449.
- The handle 'dirp' was created at fs_main.c:818 by calling function 'opendir' and lost at fs_main.c:819.

mtd_partition.c
- Use of vulerable function 'strcpy' at mtd_partition.c:572. This function is unsafe, use strncpy instead.
apps/examples/testcase/le_tc/filesystem/fs_main.c
os/fs/driver/mtd/mtd_partition.c