From dd40aabd81470c10ba9a47377b1f011a519be15a Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Wed, 20 Jul 2016 12:22:23 +0200 Subject: seq: guard misparse --- seq.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'seq.c') diff --git a/seq.c b/seq.c index 2402875..a2648bf 100644 --- a/seq.c +++ b/seq.c @@ -268,6 +268,9 @@ blaze822_seq_next(char *map, char *range, struct blaze822_seq_iter *iter) iter->line = 1; } + if (!iter->s) + return 0; + while (iter->line < iter->start) { char *t = strchr(iter->s, '\n'); if (!t) -- cgit 1.4.1