Whamcloud - gitweb
a small fix to the reference beyond the buffer
authortianying <tianying>
Sun, 9 May 2004 09:12:03 +0000 (09:12 +0000)
committertianying <tianying>
Sun, 9 May 2004 09:12:03 +0000 (09:12 +0000)
lustre/lvfs/llog.c

index 12da23b..0b647a7 100644 (file)
@@ -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));
                 }