View | Details | Raw Unified | Return to bug 258847 | Differences between
and this patch

Collapse All | Expand All

(-)sysutils/lnav/Makefile (-1 / +3 lines)
Lines 1-7 Link Here
1
# Created by: Thomas Hurst <tom@hur.st>
1
# Created by: Thomas Hurst <tom@hur.st>
2
2
3
PORTNAME=	lnav
3
PORTNAME=	lnav
4
PORTVERSION=	0.9.0
4
PORTVERSION=	0.10.0
5
CATEGORIES=	sysutils
5
CATEGORIES=	sysutils
6
MASTER_SITES=	https://github.com/tstack/${PORTNAME}/releases/download/v${PORTVERSION}/
6
MASTER_SITES=	https://github.com/tstack/${PORTNAME}/releases/download/v${PORTVERSION}/
7
7
Lines 10-15 COMMENT= Terminal based log file navigator Link Here
10
10
11
LICENSE=	BSD2CLAUSE
11
LICENSE=	BSD2CLAUSE
12
12
13
BROKEN_i386=	see https://github.com/tstack/lnav/issues/781
14
13
LIB_DEPENDS=	libpcrecpp.so:devel/pcre
15
LIB_DEPENDS=	libpcrecpp.so:devel/pcre
14
16
15
USES=		autoreconf compiler:c++14-lang gmake ncurses readline sqlite tar:bz2
17
USES=		autoreconf compiler:c++14-lang gmake ncurses readline sqlite tar:bz2
(-)sysutils/lnav/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1601099244
1
TIMESTAMP = 1633033418
2
SHA256 (lnav-0.9.0.tar.bz2) = 9ba2c9c745d1479ec0eed0201cba7fdb223fc0489c50b20a54af3d2a1b2ae550
2
SHA256 (lnav-0.10.0.tar.bz2) = 91b17a2d655283bb081e1f236afe2171cef58695e75c6ef7a89d55bfab0493be
3
SIZE (lnav-0.9.0.tar.bz2) = 877288
3
SIZE (lnav-0.10.0.tar.bz2) = 1365009
(-)sysutils/lnav/files/patch-src_logfile.cc (-37 lines)
Removed Link Here
1
--- src/logfile.cc.orig	2020-09-09 16:17:12 UTC
2
+++ src/logfile.cc
3
@@ -323,10 +323,13 @@ logfile::rebuild_result_t logfile::rebuild_index()
4
 
5
             this->lf_line_buffer.clear();
6
             if (!this->lf_index.empty()) {
7
-                off_t check_line_off = this->lf_index.back().get_offset();
8
+                auto last_line = this->lf_index.end();
9
+                --last_line;
10
+                off_t check_line_off = last_line->get_offset();
11
+                auto last_length = ssize_t(this->line_length(last_line, false));
12
 
13
                 auto read_result = this->lf_line_buffer.read_range({
14
-                    check_line_off, this->lf_index_size - check_line_off
15
+                    check_line_off, last_length
16
                 });
17
 
18
                 if (read_result.isErr()) {
19
@@ -553,7 +556,7 @@ filesystem::path logfile::get_path() const
20
 
21
 size_t logfile::line_length(logfile::iterator ll, bool include_continues)
22
 {
23
-    iterator next_line = ll;
24
+    auto next_line = ll;
25
     size_t retval;
26
 
27
     if (!include_continues && this->lf_next_line_cache) {
28
@@ -570,6 +573,9 @@ size_t logfile::line_length(logfile::iterator ll, bool
29
 
30
     if (next_line == this->end()) {
31
         retval = this->lf_index_size - ll->get_offset();
32
+        if (retval > line_buffer::MAX_LINE_BUFFER_SIZE) {
33
+            retval = line_buffer::MAX_LINE_BUFFER_SIZE;
34
+        }
35
         if (retval > 0 && !this->lf_partial_line) {
36
             retval -= 1;
37
         }

Return to bug 258847