msm: ipa3: using strscpy to have a robust string copy
Adding change to use strscpy to have a robust way of string
copying into another buffer, if we have unknown source string
at run time to avoid fortify_panic.
Change-Id: I16a4fce06ef9bc47b4c6c3d901984e0a7c514d38
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c b/drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c
index a57e36d..db353f3 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c
@@ -587,7 +587,7 @@
memcpy(entry->hdr, hdr->hdr, hdr->hdr_len);
entry->hdr_len = hdr->hdr_len;
- strlcpy(entry->name, hdr->name, IPA_RESOURCE_NAME_MAX);
+ strscpy(entry->name, hdr->name, IPA_RESOURCE_NAME_MAX);
entry->is_partial = hdr->is_partial;
entry->type = hdr->type;
entry->is_eth2_ofst_valid = hdr->is_eth2_ofst_valid;