summaryrefslogtreecommitdiffstats
path: root/test/tunicode.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/tunicode.c')
-rw-r--r--test/tunicode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/tunicode.c b/test/tunicode.c
index 3b949e9..0386352 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -161,6 +161,7 @@ void test_strpad(hid_t UNUSED fid, const char *string)
/* Create a src_type that holds the UTF-8 string and its final NULL */
big_len = length + 1; /* +1 byte for final NULL */
+ HDassert((2*big_len)<=sizeof(cmpbuf));
src_type = mkstr(big_len, H5T_STR_NULLTERM);
CHECK(src_type, FAIL, "mkstr");
/* Create a dst_type that holds half of the UTF-8 string and a final
@@ -224,6 +225,7 @@ void test_strpad(hid_t UNUSED fid, const char *string)
/* Create a src_type that holds the UTF-8 string */
big_len = length;
+ HDassert((2*big_len)<=sizeof(cmpbuf));
src_type = mkstr(big_len, H5T_STR_NULLPAD);
CHECK(src_type, FAIL, "mkstr");
/* Create a dst_type that holds half of the UTF-8 string */