From: tianying Date: Sun, 9 May 2004 09:12:03 +0000 (+0000) Subject: a small fix to the reference beyond the buffer X-Git-Tag: 1.2.2~41 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=09298c703e34133d995d4dede0741c85dba12e05;p=fs%2Flustre-release.git a small fix to the reference beyond the buffer --- diff --git a/lustre/lvfs/llog.c b/lustre/lvfs/llog.c index 12da23b..0b647a7 100644 --- a/lustre/lvfs/llog.c +++ b/lustre/lvfs/llog.c @@ -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)); }