display: Remove klockwork warnings and errors.
Remove all klockwork warnings and errors for libgralloc,
libhwcomposer, liboverlay, libqdutils, libqservice, libvirtual,
libexternal libraries to avoid buffer overflow and memory leaks.
Change-Id: I078143bcbcf5e4b342156bd8305a644566f7cc4b
diff --git a/liboverlay/overlayUtils.h b/liboverlay/overlayUtils.h
index 24fba33..c558cf3 100644
--- a/liboverlay/overlayUtils.h
+++ b/liboverlay/overlayUtils.h
@@ -816,7 +816,7 @@
inline void OvFD::setPath(const char* const dev)
{
- ::strncpy(mPath, dev, utils::MAX_PATH_LEN);
+ ::strlcpy(mPath, dev, sizeof(mPath));
}
inline bool OvFD::close()