Skip to content
Snippets Groups Projects
Commit c6eb8e56 authored by HAMANO Tsukasa's avatar HAMANO Tsukasa Committed by Quanah Gibson-Mount
Browse files

ITS#9643 Fix out of bounds read in entry_decode()

parent cd0c0437
No related branches found
No related tags found
No related merge requests found
......@@ -845,7 +845,8 @@ int entry_decode(EntryHeader *eh, Entry **e)
a = x->e_attrs;
bptr = (BerVarray)eh->bv.bv_val;
while ((i = entry_getlen(&ptr))) {
while (((char *)ptr - eh->bv.bv_val < eh->bv.bv_len) &&
(i = entry_getlen(&ptr))) {
struct berval bv;
bv.bv_len = i;
bv.bv_val = (char *) ptr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment