Commit ccb4f485 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 73be971a
Pipeline #3407 canceled with stage
in 22 seconds
......@@ -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;
......
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