diff options
Diffstat (limited to 'usr.sbin/fifolog')
-rw-r--r-- | usr.sbin/fifolog/lib/fifolog_reader.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/fifolog/lib/fifolog_reader.c b/usr.sbin/fifolog/lib/fifolog_reader.c index 77e586f..6f18fbb 100644 --- a/usr.sbin/fifolog/lib/fifolog_reader.c +++ b/usr.sbin/fifolog/lib/fifolog_reader.c @@ -225,6 +225,8 @@ fifolog_reader_chop(struct fifolog_reader *fr, fifolog_reader_render_t *func, vo if (u & FIFOLOG_LENGTH) { v = p[w]; w++; + if (p + w + v >= q) + return (p); } else { for (v = 0; p + v + w < q && p[v + w] != '\0'; v++) continue; |