commit 64be38e440e0cfb3666913f1772faa81cfdd450b
parent 239d2c94559ecb2b0eae3428a1cb81b2ffa74a82
Author: Leonardo Taccari <iamleot@gmail.com>
Date: Fri, 26 Jun 2020 00:47:44 +0200
do not reserve any space for invalid TSV lines
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sfeed_curses.c b/sfeed_curses.c
@@ -880,8 +880,10 @@ feed_getitems(struct item **items, size_t *nitems, ssize_t want,
if (line[linelen - 1] == '\n')
line[--linelen] = '\0';
- if (linetoitem(line, item) == -1)
+ if (linetoitem(line, item) == -1) {
+ i--;
continue;
+ }
(*nitems)++;
}