Skip to content

Commit

Permalink
Do not attempt to render a logrecord with length byte, until we have
Browse files Browse the repository at this point in the history
decompressed all the bytes required.
  • Loading branch information
bsdphk committed May 15, 2010
1 parent 85e899c commit 0d79835
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions usr.sbin/fifolog/lib/fifolog_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0d79835

Please sign in to comment.