Commit 8c5362dd authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Merge termination bugfix from main. Provided by <vasquez@w270.de>.

parent da1691bb
......@@ -31,7 +31,9 @@
extern char *str_getline( char **next );
extern void ch_free( char *p );
#ifndef SYSERRLIST_IN_STDIO
extern char *sys_errlist[];
#endif /* SYSERRLIST_IN_STDIO */
/* Forward references */
static Rh *get_repl_hosts( char *, int *, char ** );
......@@ -182,7 +184,9 @@ Re_parse(
state |= GOT_TIME;
break;
case T_DN:
re->re_dn = strdup( value );
re->re_dn = ch_malloc( len + 1 );
memcpy( re->re_dn, value, len );
re->re_dn[ len ]='\0';
state |= GOT_DN;
break;
default:
......@@ -222,7 +226,9 @@ Re_parse(
sizeof( Mi ) * ( nml + 2 ));
re->re_mods[ nml ].mi_type = strdup( type );
if ( value != NULL ) {
re->re_mods[ nml ].mi_val = strdup( value );
re->re_mods[ nml ].mi_val = ch_malloc( len + 1 );
memcpy( re->re_mods[ nml ].mi_val, value, len );
re->re_mods[ nml ].mi_val[ len ] = '\0';
re->re_mods[ nml ].mi_len = len;
} else {
re->re_mods[ nml ].mi_val = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment