Hi Hoa, Ack
Thanks Minh On 14/05/18 19:17, Hoa Le wrote:
osafntfimcnd uses old style SaNameT when sending notification. The SaNameT's length will be adjusted to 256 when it's value contains 255 characters excluded the NULL character. This SaNameT is now not a valid extended name and causes osafntfimcnd to exit. This patch helps avoid the above issue by using the new style of SaNameT if the SaNameT' value is a 255 chars DN. --- src/ntf/common/ntfsv_mem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ntf/common/ntfsv_mem.c b/src/ntf/common/ntfsv_mem.c index d570d64..64228de 100644 --- a/src/ntf/common/ntfsv_mem.c +++ b/src/ntf/common/ntfsv_mem.c @@ -1448,7 +1448,8 @@ void ntfs_sanamet_alloc(SaConstStringT value, size_t length, SaNameT *pName) /* Accept the old SaNameT which's @.length counting the null termination */ if (!osaf_is_an_extended_name(pName) && - ((ntfs_sanamet_length(pName) + 1) == length)) { + (length < SA_MAX_UNEXTENDED_NAME_LENGTH) && + ((ntfs_sanamet_length(pName) + 1) == length)) { *((SaUint16T *)pName) += 1; } } @@ -1466,7 +1467,8 @@ void ntfs_sanamet_steal(SaStringT value, size_t length, SaNameT *pName) /* Accept the old SaNameT which's @.length counting the null termination */ if (!osaf_is_an_extended_name(pName) && - ((ntfs_sanamet_length(pName) + 1) == length)) { + (length < SA_MAX_UNEXTENDED_NAME_LENGTH) && + ((ntfs_sanamet_length(pName) + 1) == length)) { *((SaUint16T *)pName) += 1; } }
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel