summaryrefslogtreecommitdiffstats
path: root/test/h5test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/h5test.c')
-rw-r--r--test/h5test.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/h5test.c b/test/h5test.c
index 5cf9224..d5ebfdf 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -1129,9 +1129,10 @@ h5_set_info_object(void)
valp++;
/* copy key/value pair into temporary buffer */
- len = strcspn(valp, ";");
- next = &valp[len];
- key_val = (char *)HDcalloc(1, len + 1);
+ len = HDstrcspn(valp, ";");
+ next = &valp[len];
+ if (NULL == (key_val = (char *)HDcalloc(1, len + 1)))
+ return -1;
/* increment the next pointer past the terminating semicolon */
if (*next == ';')