summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/H5private.h b/src/H5private.h
index eac2cba..91a4780 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -327,6 +327,15 @@
*/
#define H5_IS_BUFFER_OVERFLOW(ptr, size, buffer_end) (((ptr) + (size)-1) > (buffer_end))
+/* Variant of H5_IS_BUFFER_OVERFLOW, used with functions such as H5Tdecode()
+ * that don't take a size parameter, where we need to skip the bounds checks.
+ *
+ * This is a separate macro since we don't want to inflict that behavior on
+ * the entire library.
+ */
+#define H5_IS_KNOWN_BUFFER_OVERFLOW(skip, ptr, size, buffer_end) \
+ (skip ? FALSE : ((ptr) + (size)-1) > (buffer_end))
+
/*
* HDF Boolean type.
*/