Based on usage of this static function, this will never happen as
results are always malloced (and checked) by caller. However, the
function is already coded to handle the first argument being null - so
be consistent throughout.
ticket:
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22177
dc483132-0cff-0310-8789-
dd5450dbe970
}
assert(ucs2len < count);
-
- /* Add null terminator if there's room in the buffer. */
- ucs2str[ucs2len] = 0;
+
+ if (ucs2str != NULL) {
+ /* Add null terminator if there's room in the buffer. */
+ ucs2str[ucs2len] = 0;
+ }
return ucs2len;
}