summaryrefslogtreecommitdiffstats
path: root/java/src/jni/h5pDCPLImp.c
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/jni/h5pDCPLImp.c')
-rw-r--r--java/src/jni/h5pDCPLImp.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/java/src/jni/h5pDCPLImp.c b/java/src/jni/h5pDCPLImp.c
index 0671843..7559c3b 100644
--- a/java/src/jni/h5pDCPLImp.c
+++ b/java/src/jni/h5pDCPLImp.c
@@ -1008,8 +1008,8 @@ Java_hdf_hdf5lib_H5_H5Pset_1scaleoffset
UNUSED(clss);
- if (scale_factor <= 0)
- H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Pset_scaleoffset: scale factor must be > 0");
+ if (scale_factor < 0)
+ H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Pset_scaleoffset: scale factor must be >= 0");
if (scale_type != H5Z_SO_FLOAT_DSCALE && scale_type != H5Z_SO_FLOAT_ESCALE && scale_type != H5Z_SO_INT)
H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Pset_scaleoffset: invalid scale type");
@@ -1074,6 +1074,9 @@ Java_hdf_hdf5lib_H5_H5Pset_1external
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Pset_external: file name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, fileName, NULL, "H5Pset_external: file name not pinned");
if ((status = H5Pset_external((hid_t)plist, fileName, (off_t)offset, (hsize_t)size)) < 0)
@@ -1189,6 +1192,11 @@ Java_hdf_hdf5lib_H5_H5Pset_1virtual
UNUSED(clss);
+ if (NULL == src_file_name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Pset_virtual: src_file_name is NULL");
+ if (NULL == src_dset_name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Pset_virtual: src_dset_name is NULL");
+
PIN_JAVA_STRING(ENVONLY, src_file_name, fstr, NULL, "H5Pset_virtual: src_file_name not pinned");
PIN_JAVA_STRING(ENVONLY, src_dset_name, dstr, NULL, "H5Pset_virtual: src_dset_name not pinned");
@@ -1352,6 +1360,9 @@ Java_hdf_hdf5lib_H5_H5Pset_1virtual_1prefix
UNUSED(clss);
+ if (NULL == prefix)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Pset_virtual_prefix: virtual prefix is NULL");
+
PIN_JAVA_STRING(ENVONLY, prefix, virtPrefix, NULL, "H5Pset_virtual_prefix: virtual prefix not pinned");
if ((retVal = H5Pset_virtual_prefix((hid_t)dapl_id, virtPrefix)) < 0)