Rework fixes in NTF and SMF. --- src/ntf/apitest/test_ntf_imcn.cc | 2 +- src/smf/smfd/SmfUtils.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ntf/apitest/test_ntf_imcn.cc b/src/ntf/apitest/test_ntf_imcn.cc index 51b9076c6..04f155074 100644 --- a/src/ntf/apitest/test_ntf_imcn.cc +++ b/src/ntf/apitest/test_ntf_imcn.cc @@ -1140,7 +1140,7 @@ static SaAisErrorT set_add_info( &nHeader->additionalInfo[idx].infoValue); if (error == SA_AIS_OK) { strcpy(reinterpret_cast<char *>(temp), infoValue); - temp[strlen(infoValue) - 1] = '\0'; + //temp[strlen(infoValue)] = '\0'; nHeader->additionalInfo[idx].infoId = infoId; nHeader->additionalInfo[idx].infoType = SA_NTF_VALUE_STRING; } diff --git a/src/smf/smfd/SmfUtils.cc b/src/smf/smfd/SmfUtils.cc index 2d539e7c2..f1593b4cf 100644 --- a/src/smf/smfd/SmfUtils.cc +++ b/src/smf/smfd/SmfUtils.cc @@ -993,7 +993,7 @@ bool smf_stringToValue(SaImmValueTypeT i_type, SaImmAttrValueT *i_value, len = strlen(i_str); *i_value = malloc(sizeof(SaStringT)); *((SaStringT *)*i_value) = (SaStringT)malloc(len + 1); - strncpy(*((SaStringT *)*i_value), i_str, len - 1); + strncpy(*((SaStringT *)*i_value), i_str, len + 1); (*((SaStringT *)*i_value))[len] = '\0'; break; case SA_IMM_ATTR_SAANYT: -- 2.21.1 ----------------------------------------------------------------------------------------------------------------------- Notice: This e-mail together with any attachments may contain information of Ribbon Communications Inc. that is confidential and/or proprietary for the sole use of the intended recipient. Any review, disclosure, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and then delete all copies, including any attachments. ----------------------------------------------------------------------------------------------------------------------- _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel