Skip to content
Snippets Groups Projects
Commit e9233c92 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Fixed null termination bug in re.c. Found by vasquez@w270.de

parent 927e7b5e
No related branches found
No related tags found
No related merge requests found
......@@ -186,6 +186,7 @@ Re_parse(
case T_DN:
re->re_dn = ch_malloc( len + 1 );
memcpy( re->re_dn, value, len );
re->re_dn[ len ]='\0';
state |= GOT_DN;
break;
default:
......@@ -227,6 +228,7 @@ Re_parse(
if ( value != NULL ) {
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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment