Commit affe8359 authored by Howard Chu's avatar Howard Chu
Browse files

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

parent e77b064a
...@@ -657,6 +657,7 @@ ber_get_next( ...@@ -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) {
......
Supports Markdown
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