/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2003 The OpenLDAP Foundation.
+ * Copyright 1998-2004 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
BerVarray bptr;
i = entry_getlen(&ptr);
+ if (!i) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, INFO,
+ "entry_decode: entry length was zero\n", 0, 0, 0);
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "entry_decode: entry length was zero\n", 0, 0, 0);
+#endif
+ return LDAP_OTHER;
+ }
x = ch_calloc(1, i);
i = entry_getlen(&ptr);
x->e_name.bv_val = (char *) ptr;