str: Make ss_alloc_substring_pool() null-terminate its output.
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 23 Mar 2011 03:55:55 +0000 (20:55 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Wed, 23 Mar 2011 04:19:49 +0000 (21:19 -0700)
commit03bfb72314e434ddaa2ff2b770d1d9df2ea1927a
tree1e97c1ac45efe164286f4743a44b16234e009fbb
parent763b593a5b5773859e3cf739b843cf0bae0359e5
str: Make ss_alloc_substring_pool() null-terminate its output.

It's inconsistent that ss_alloc_substring() null-terminates its output
but ss_alloc_substring_pool() does not.  This caught us out in
recode_substring_pool(), which used ss_alloc_substring_pool() in a
fallback case where create_iconv() failed and expected the result to
be null-terminated.

Reported-by: Jeremy Lavergne <jeremy@lavergne.gotdns.org>
src/libpspp/str.c