NUL-terminate alloc'd berbuf (ITS#3086)

This commit is contained in:
Howard Chu 2004-04-15 10:25:14 +00:00
parent e77b064aab
commit affe835984

View File

@ -657,6 +657,7 @@ ber_get_next(
AC_MEMCPY(ber->ber_buf + sblen, ber->ber_ptr, l); AC_MEMCPY(ber->ber_buf + sblen, ber->ber_ptr, l);
sblen += l; sblen += l;
} }
*ber->ber_end = '\0';
ber->ber_ptr = ber->ber_buf; ber->ber_ptr = ber->ber_buf;
ber->ber_usertag = 0; ber->ber_usertag = 0;
if ((ber_len_t)sblen == ber->ber_len) { if ((ber_len_t)sblen == ber->ber_len) {