Skip to content
Snippets Groups Projects
Commit 09298c70 authored by tianying's avatar tianying
Browse files

a small fix to the reference beyond the buffer

parent 4479365b
No related merge requests found
......@@ -345,6 +345,10 @@ int llog_reverse_process(struct llog_handle *loghandle, llog_cb_t cb,
--index;
if (index < first_index)
GOTO(out, rc = 0);
if ((void *)rec == buf)
break;
tail = (void *)rec - sizeof(struct llog_rec_tail);
rec = ((void *)rec - le32_to_cpu(tail->lrt_len));
}
......
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