$OpenBSD: patch-servers_slapd_schema_init_c,v 1.3 2011/10/29 11:54:04 gsoares Exp $

Security Fix - SA46599
"UTF8StringNormalize()" Off-by-One Denial of Service Vulnerability
patch from upstream git

--- servers/slapd/schema_init.c.orig	Thu Jun 30 12:13:36 2011
+++ servers/slapd/schema_init.c	Thu Oct 27 08:38:07 2011
@@ -1852,7 +1852,7 @@ UTF8StringNormalize(
 		}
 		nvalue.bv_val[nvalue.bv_len] = '\0';
 
-	} else {
+	} else if ( nvalue.bv_len )  {
 		/* string of all spaces is treated as one space */
 		nvalue.bv_val[0] = ' ';
 		nvalue.bv_val[1] = '\0';
