From: Pierangelo Masarati Date: Mon, 29 Dec 2003 15:10:59 +0000 (+0000) Subject: allow '%' escape; treat anything else as error X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~93 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=748e144a16436db06378333b8a5137b4eeea89f0;p=openldap allow '%' escape; treat anything else as error --- diff --git a/libraries/librewrite/subst.c b/libraries/librewrite/subst.c index ee32dbd76f..c96e15ce57 100644 --- a/libraries/librewrite/subst.c +++ b/libraries/librewrite/subst.c @@ -160,6 +160,16 @@ rewrite_subst_compile( submatch[ nsub ].ls_type = REWRITE_SUBMATCH_MAP_W_ARG; submatch[ nsub ].ls_map = map; + + /* + * Escape '%' ... + */ + } else if ( p[ 1 ] == '%' ) { + AC_MEMCPY( &p[ 1 ], &p[ 2 ], strlen( &p[ 1 ] ) ); + continue; + + } else { + return NULL; } nsub++;