]> git.sur5r.net Git - openldap/blobdiff - libraries/liblber/lber-int.h
check for overflows
[openldap] / libraries / liblber / lber-int.h
index 9870f3bdda976d51d45b54102bb78522c4ebb2e9..fde8bc5470a1454c1986c0b88779474a24aa6a34 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2007 The OpenLDAP Foundation.
+ * Copyright 1998-2008 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -47,6 +47,11 @@ LBER_V (BER_ERRNO_FN) ber_int_errno_fn;
 #ifdef LDAP_MEMORY_DEBUG
 LBER_V (long)  ber_int_meminuse;
 #endif
+#if defined(LDAP_MEMORY_DEBUG) && ((LDAP_MEMORY_DEBUG +0) & 2)
+# define LDAP_MEMORY_DEBUG_ASSERT assert
+#else
+# define LDAP_MEMORY_DEBUG_ASSERT(expr) ((void) 0)
+#endif
 
 struct lber_options {
        short lbo_valid;
@@ -120,6 +125,14 @@ struct seqorset {
 };
 
 
+/*
+ * decode.c, encode.c
+ */
+
+/* Simplest OID max-DER-component to implement in both decode and encode */
+#define LBER_OID_COMPONENT_MAX ((unsigned long)-1 - 128)
+
+
 /*
  * io.c
  */