sfeed_curses: fix incorrect truncates of item titles when year is > 4 digits - sfeed - RSS and Atom parser
HTML git clone git://git.codemadness.org/sfeed
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 5d823084a6a7be97aed3eeb0ea814e0e16b77437
DIR parent 147e779c73ee71228a55ec423b8a2f8bd658b2dc
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 27 Sep 2026 13:40:25 +0200
sfeed_curses: fix incorrect truncates of item titles when year is > 4 digits
in item_row_format() years are zero padded, but can still be longer than 4
digits.
snprintf(text, textsize, "%c %04d-%02d-%02d %02d:%02d %s", ...)
To reproduce:
printf '11111111789516800\tbla' | sfeed_curses
bla would not be visible
Note that > 4 digits will be misaligned, but this can be fixed somewhere before
the year 9999 when RSS is still not dead yet ;)
Reported by jb19357, thanks!
Diffstat:
M sfeed_curses.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
DIR diff --git a/sfeed_curses.c b/sfeed_curses.c
@@ -1788,7 +1788,7 @@ item_row_format(struct pane *p, struct row *row)
item = row->data;
- needsize = strlen(item->fields[FieldTitle]) + 21;
+ needsize = strlen(item->fields[FieldTitle]) + 64;
if (needsize > textsize) {
text = erealloc(text, needsize);
textsize = needsize;