From 348d43e82f5cde947d30e4f7ed9ecbe53c36a109 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 19 Jul 2012 01:38:39 -0700 Subject: [PATCH] ITS#7325 fix entry len --- servers/slapd/back-perl/add.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-perl/add.c b/servers/slapd/back-perl/add.c index 0df962b422..9ce38d13f3 100644 --- a/servers/slapd/back-perl/add.c +++ b/servers/slapd/back-perl/add.c @@ -25,6 +25,7 @@ perl_back_add( PerlBackend *perl_back = (PerlBackend *) op->o_bd->be_private; int len; int count; + char *str; PERL_SET_CONTEXT( PERL_INTERPRETER ); ldap_pvt_thread_mutex_lock( &perl_interpreter_mutex ); @@ -35,7 +36,8 @@ perl_back_add( PUSHMARK(sp); XPUSHs( perl_back->pb_obj_ref ); - XPUSHs(sv_2mortal(newSVpv( entry2str( op->ora_e, &len ), len ))); + str = entry2str( op->ora_e, &len ); + XPUSHs(sv_2mortal(newSVpv( str, len ))); PUTBACK;