When this function is called with the RCPVf_USE_STRLEN flag, it gets the string length by calling strlen(pv). Coverity (CID 376192) points out that pv could be NULL.
This commit adds an assert(pv), so that the code will bail out on the line before the strlen() in this case, which is probably enough to silence Coverity. Perhaps we aught to have a proper croak() there, but this is a utility function mainly used in limited places in the core, where the caller likely knows that they're doing.
When this function is called with the RCPVf_USE_STRLEN flag, it gets the string length by calling strlen(pv). Coverity (CID 376192) points out that pv could be NULL.
This commit adds an assert(pv), so that the code will bail out on the line before the strlen() in this case, which is probably enough to silence Coverity. Perhaps we aught to have a proper croak() there, but this is a utility function mainly used in limited places in the core, where the caller likely knows that they're doing.