On 7/2/2014 3:55 PM, opensaf-devel-requ...@lists.sourceforge.net wrote: > +size_t ntfs_sanamet_length(const SaNameT* pName) > +{ > + if (osaf_is_an_extended_name(pName)) > + return osaf_extended_name_length(pName); > + The below comment is wrong, I will update together with other comments from reviewers if any. > + /* In case of unextended name, the length returned by > + * osaf_extended_name_length sometimes is greater than @.length since if > + * @.value is not a null-terminated string, and it reads over the > + * @.length character(s). Here we need the length specified in @.length > + */ It should be: /* In case of unextended name, sometimes @.length includes the count on * null-termination, and osaf_extended_name_length returns the length * excluding the null-termination which less 1 than the @.length. Here * we need the length specified in @.length. This case mainly applies * in encodeSaNameT/decodeSaNameT in order to preserve the original * @.length value */
> + size_t length = 0; > + memcpy(&length, (char*)pName, 2); > + osafassert(length < SA_MAX_UNEXTENDED_NAME_LENGTH); > + return length; > +} ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel