/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2000-2007 The OpenLDAP Foundation.
+ * Copyright 2000-2011 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
case REWRITE_MODE_COPY_INPUT:
*result = strdup( string );
- rc = REWRITE_REGEXEC_OK;
+ rc = ( *result != NULL ) ? REWRITE_REGEXEC_OK : REWRITE_REGEXEC_ERR;
goto rc_return;
case REWRITE_MODE_USE_DEFAULT: