The docs in str.h should be probably changed as well (here is documented that str is not null-terminated). Also probably a good idea to review other invocation of this utilty functions in the modules, now there might be double null-termination done somewhere (might be harmless in most cases, though).