This patch resolves an SVACE issue, #58850, which is related to
TAINTED_PTR.
Change-Id: I8f43270775d0cd7df00ec1ae8f7d9d1ab7d9b347
Signed-off-by: Wook Song <wook16.song@samsung.com>
int
main (int argc, char **argv) {
UtilTRIV2 tester;
- char *dir_str;
+ char dir_str[PATH_MAX];
int task_id, status, index;
std::ios_base::fmtflags f (cerr.flags ());
return 0;
}
- dir_str = argv[index];
+ strncpy (dir_str, argv[index], PATH_MAX - 1);
DIR *d = opendir (dir_str);
if (!d) {
cerr << "Failed to open " << dir_str << "\n";
#include "ne_test_utils_common.h"
+#include <limits.h>
+
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
#include <libnpuhost.h>
#include <npubinfmt.h>
#include <stddef.h>