sfeed_curses.c: if a command (argv[0]) is empty do not try to execute - 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 ad02e2b4169d0a7b2ce4d209dbe4c2deca4bd7d8
DIR parent ba641e578512569d70f74c9b1b309d3247ea0d14
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 21 Feb 2026 12:17:01 +0100
sfeed_curses.c: if a command (argv[0]) is empty do not try to execute
Also in the documentation reword the part for a valid being "unset" and
"empty".
Diffstat:
M sfeed_content.1 | 6 +++---
M sfeed_curses.c | 9 +++++++++
2 files changed, 12 insertions(+), 3 deletions(-)
---
DIR diff --git a/sfeed_content.1 b/sfeed_content.1
@@ -1,4 +1,4 @@
-.Dd October 27, 2024
+.Dd February 7, 2026
.Dt SFEED_CONTENT 1
.Os
.Sh NAME
@@ -27,10 +27,10 @@ to view content.
.Bl -tag -width Ds
.It Ev PAGER
The pager used to view the content.
-If it is not set it will use "less -R" by default.
+If it is not set or empty it will use "less -R" by default.
.It Ev SFEED_HTMLCONV
The program used to convert HTML content to plain-text.
-If it is not set it will use lynx by default.
+If it is not set or empty it will use lynx by default.
.El
.Sh EXIT STATUS
.Ex -std
DIR diff --git a/sfeed_curses.c b/sfeed_curses.c
@@ -570,6 +570,9 @@ pipeitem(const char *cmd, struct item *item, int field, int interactive)
pid_t pid;
int i, status;
+ if (!cmd || !cmd[0])
+ return;
+
if (interactive)
cleanup();
@@ -608,6 +611,9 @@ forkexec(char *argv[], int interactive)
{
pid_t pid;
+ if (!argv[0] || !argv[0][0])
+ return;
+
if (interactive)
cleanup();
@@ -1817,6 +1823,9 @@ markread(struct pane *p, off_t from, off_t to, int isread)
cmd = isread ? markreadcmd : markunreadcmd;
+ if (!cmd || !cmd[0])
+ return;
+
switch ((pid = fork())) {
case -1:
die("fork");